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 3.54 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
10
    gui/adjusterwidgets/*.cpp
11
12
    gui/mdi/*.cpp
    gui/properties/*.cpp
13
    tools/*.cpp
schultezub's avatar
   
schultezub committed
14
15
)

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

26
27
28
29
FILE(GLOB CampvisApplicationForms
    ui/*.ui
)

schultezub's avatar
schultezub committed
30
SET(CampvisApplicationToBeMocced
31
    gui/mainwindow.h
32
    gui/datacontainerinspectorcanvas.h
33
34
    gui/datacontainerinspectorwidget.h
    gui/datacontainertreewidget.h
35
    gui/pipelinetreewidget.h
schultezub's avatar
schultezub committed
36
    gui/qtcolortools.h
37
    gui/qtdatahandle.h
38
    gui/logviewerwidget.h
39
    gui/loghighlighter.h
40
    gui/mdi/mdidockarea.h
41
    gui/mdi/mdidockablewindow.h
42
    gui/mdi/mdidockedwindow.h
43
    gui/mdi/mdifloatingwindow.h
44
    gui/adjusterwidgets/doubleadjusterwidget.h
45
    gui/adjusterwidgets/intadjusterwidget.h
schultezub's avatar
schultezub committed
46
    gui/properties/abstractpropertywidget.h
schultezub's avatar
schultezub committed
47
    gui/properties/abstracttransferfunctioneditor.h
schultezub's avatar
schultezub committed
48
    gui/properties/boolpropertywidget.h
schultezub's avatar
schultezub committed
49
    gui/properties/buttonpropertywidget.h
schultezub's avatar
schultezub committed
50
    gui/properties/camerapropertywidget.h
51
    gui/properties/datanamepropertywidget.h
schultezub's avatar
schultezub committed
52
    gui/properties/intpropertywidget.h
schultezub's avatar
schultezub committed
53
    gui/properties/floatpropertywidget.h
schultezub's avatar
schultezub committed
54
    gui/properties/geometry1dtransferfunctioneditor.h
55
    gui/properties/geometry2dtransferfunctioneditor.h
56
    gui/properties/metapropertywidget.h
57
    gui/properties/optionpropertywidget.h
schultezub's avatar
schultezub committed
58
    gui/properties/propertycollectionwidget.h
schultezub's avatar
schultezub committed
59
    gui/properties/simpletransferfunctioneditor.h
schultezub's avatar
schultezub committed
60
    gui/properties/stringpropertywidget.h
61
    gui/properties/transferfunctionpropertywidget.h
62
    tools/qtexteditlog.h
63
    tools/bufferinglog.h
64
)
schultezub's avatar
   
schultezub committed
65

66
67
LIST(APPEND CampvisApplicationDefinitions "-DCAMPVIS_SOURCE_DIR=\"${CampvisHome}\"")

schultezub's avatar
   
schultezub committed
68
69
70
#
# Qt related stuff:
#
schultezub's avatar
schultezub committed
71
72
73
FIND_PACKAGE(Qt4 ${CampvisRequiredQtVersion} REQUIRED QtCore QtGui QtOpenGL)
QT4_WRAP_CPP(CampvisApplicationMoc ${CampvisApplicationToBeMocced})
LIST(APPEND CampvisApplicationSources ${CampvisApplicationMoc})
74
75
QT4_WRAP_UI(CampvisApplicationFormsHeaders ${CampvisApplicationForms})
LIST(APPEND CampvisApplicationSources ${CampvisApplicationFormsHeaders})
schultezub's avatar
   
schultezub committed
76
INCLUDE(${QT_USE_FILE})
77

78
LINK_DIRECTORIES(${CampvisGlobalLinkDirectories} ${CampvisModulesLinkDirectories})
79

80
81
ADD_EXECUTABLE(campvis-application
    ${CampvisApplicationSources} ${CampvisApplicationHeaders}
schultezub's avatar
schultezub committed
82
    ${CampvisApplicationMoc}
83
)
84
ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${CampvisModulesDefinitions} ${CampvisApplicationDefinitions} ${QT_DEFINITIONS})
85
86
INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs} ${CampvisModulesIncludeDirs})
TARGET_LINK_LIBRARIES(campvis-application campvis-core campvis-modules tgt ${CampvisGlobalExternalLibs} ${CampvisModulesExternalLibs} ${QT_LIBRARIES})
87

88
89
90
91
92
93
94

IF(CAMPVIS_GROUP_SOURCE_FILES)
    DEFINE_SOURCE_GROUPS_FROM_SUBDIR(CampvisApplicationSources ${CampvisHome} "")
    DEFINE_SOURCE_GROUPS_FROM_SUBDIR(CampvisApplicationHeaders ${CampvisHome} "")
ENDIF()


95
96
97
98
99
100
101
102
103
104
105
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)