2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

CMakeLists.txt 2.85 KB
Newer Older
schultezub's avatar
schultezub committed
1
PROJECT(campvis-application)
schultezub's avatar
   
schultezub committed
2
3
4
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
INCLUDE(../cmake/commonconf.cmake)

schultezub's avatar
schultezub committed
5
MESSAGE(STATUS "Configuring CAMPVis Application")
schultezub's avatar
   
schultezub committed
6

schultezub's avatar
schultezub committed
7
FILE(GLOB CampvisApplicationSources
schultezub's avatar
   
schultezub committed
8
    *.cpp
9
    gui/*.cpp
schultezub's avatar
schultezub committed
10
    gui/properties/*.cpp
11
    tools/*.cpp
schultezub's avatar
   
schultezub committed
12
13
)

schultezub's avatar
schultezub committed
14
FILE(GLOB CampvisApplicationHeaders
schultezub's avatar
   
schultezub committed
15
    *.h
16
17
    glsl/*.frag
    glsl/*.vert
18
    gui/*.h
schultezub's avatar
schultezub committed
19
    gui/properties/*.h
20
    tools/*.h
schultezub's avatar
   
schultezub committed
21
22
)

23
24
25
26
FILE(GLOB CampvisApplicationForms
    ui/*.ui
)

schultezub's avatar
schultezub committed
27
SET(CampvisApplicationToBeMocced
28
    gui/mainwindow.h
29
    gui/datacontainerinspectorcanvas.h
30
31
    gui/datacontainerinspectorwidget.h
    gui/datacontainertreewidget.h
32
    gui/pipelinetreewidget.h
schultezub's avatar
schultezub committed
33
    gui/qtcolortools.h
34
    gui/qtdatahandle.h
schultezub's avatar
schultezub committed
35
    gui/properties/abstractpropertywidget.h
schultezub's avatar
schultezub committed
36
    gui/properties/abstracttransferfunctioneditor.h
schultezub's avatar
schultezub committed
37
    gui/properties/boolpropertywidget.h
schultezub's avatar
schultezub committed
38
    gui/properties/buttonpropertywidget.h
schultezub's avatar
schultezub committed
39
    gui/properties/camerapropertywidget.h
schultezub's avatar
schultezub committed
40
    gui/properties/intpropertywidget.h
schultezub's avatar
schultezub committed
41
    gui/properties/floatpropertywidget.h
schultezub's avatar
schultezub committed
42
    gui/properties/geometry1dtransferfunctioneditor.h
43
    gui/properties/geometry2dtransferfunctioneditor.h
44
    gui/properties/optionpropertywidget.h
schultezub's avatar
schultezub committed
45
    gui/properties/propertycollectionwidget.h
schultezub's avatar
schultezub committed
46
    gui/properties/simpletransferfunctioneditor.h
schultezub's avatar
schultezub committed
47
    gui/properties/stringpropertywidget.h
48
    gui/properties/transferfunctionpropertywidget.h
49
)
schultezub's avatar
   
schultezub committed
50

51
52
LIST(APPEND CampvisApplicationDefinitions "-DCAMPVIS_SOURCE_DIR=\"${CampvisHome}\"")

schultezub's avatar
   
schultezub committed
53
54
55
#
# Qt related stuff:
#
schultezub's avatar
schultezub committed
56
57
58
FIND_PACKAGE(Qt4 ${CampvisRequiredQtVersion} REQUIRED QtCore QtGui QtOpenGL)
QT4_WRAP_CPP(CampvisApplicationMoc ${CampvisApplicationToBeMocced})
LIST(APPEND CampvisApplicationSources ${CampvisApplicationMoc})
59
60
QT4_WRAP_UI(CampvisApplicationFormsHeaders ${CampvisApplicationForms})
LIST(APPEND CampvisApplicationSources ${CampvisApplicationFormsHeaders})
schultezub's avatar
   
schultezub committed
61
INCLUDE(${QT_USE_FILE})
62

63
LINK_DIRECTORIES(${CampvisGlobalLinkDirectories} ${CampvisModulesLinkDirectories})
64

schultezub's avatar
schultezub committed
65
ADD_EXECUTABLE(campvis-application 
schultezub's avatar
schultezub committed
66
67
    ${CampvisApplicationSources} ${CampvisApplicationHeaders} 
    ${CampvisApplicationMoc}
schultezub's avatar
   
schultezub committed
68
) 
69
ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${CampvisModulesDefinitions} ${CampvisApplicationDefinitions} ${QT_DEFINITIONS})
70
71
INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs} ${CampvisModulesIncludeDirs})
TARGET_LINK_LIBRARIES(campvis-application campvis-core campvis-modules tgt ${CampvisGlobalExternalLibs} ${CampvisModulesExternalLibs} ${QT_LIBRARIES})
72
73
74
75
76
77
78
79
80
81
82
83

IF(CAMPVIS_DEPLOY_SHADERS)
    LIST(APPEND CampvisShaderDirectories "application/glsl")
    LIST(APPEND CampvisShaderDirectories "core/glsl")

    FOREACH(Directory ${CampvisShaderDirectories})
        ADD_CUSTOM_COMMAND(
            TARGET campvis-application
            COMMAND ${CMAKE_COMMAND} -E copy_directory "${CampvisHome}/${Directory}" "$<TARGET_FILE_DIR:campvis-application>/${Directory}"
        )
    ENDFOREACH()
ENDIF(CAMPVIS_DEPLOY_SHADERS)