CMakeLists.txt 4.42 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
    qtjobprocessor.h
32
    gui/mainwindow.h
33
    gui/datacontainerinspectorcanvas.h
34
    gui/datacontainerinspectorwidget.h
35
    gui/datacontainerfileloaderwidget.h
36
    gui/datacontainertreewidget.h
37
    gui/pipelinetreewidget.h
schultezub's avatar
schultezub committed
38
    gui/qtcolortools.h
39
    gui/qtdatahandle.h
40
    gui/logviewerwidget.h
41
    gui/loghighlighter.h
42
    gui/scriptingwidget.h
43
    gui/mdi/mdidockarea.h
44
    gui/mdi/mdidockablewindow.h
45
    gui/mdi/mdidockedwindow.h
46
    gui/mdi/mdifloatingwindow.h
47
    gui/adjusterwidgets/doubleadjusterwidget.h
48
    gui/adjusterwidgets/intadjusterwidget.h
schultezub's avatar
schultezub committed
49
    gui/properties/abstractpropertywidget.h
schultezub's avatar
schultezub committed
50
    gui/properties/abstracttransferfunctioneditor.h
schultezub's avatar
schultezub committed
51
    gui/properties/boolpropertywidget.h
schultezub's avatar
schultezub committed
52
    gui/properties/buttonpropertywidget.h
schultezub's avatar
schultezub committed
53
    gui/properties/camerapropertywidget.h
54
    gui/properties/datanamepropertywidget.h
schultezub's avatar
schultezub committed
55
    gui/properties/intpropertywidget.h
schultezub's avatar
schultezub committed
56
    gui/properties/floatpropertywidget.h
Hossain Mahmud's avatar
Hossain Mahmud committed
57
    gui/properties/colorpropertywidget.h
schultezub's avatar
schultezub committed
58
    gui/properties/geometry1dtransferfunctioneditor.h
59
    gui/properties/geometry2dtransferfunctioneditor.h
60
    gui/properties/metapropertywidget.h
61
    gui/properties/optionpropertywidget.h
schultezub's avatar
schultezub committed
62
    gui/properties/propertycollectionwidget.h
schultezub's avatar
schultezub committed
63
    gui/properties/simpletransferfunctioneditor.h
schultezub's avatar
schultezub committed
64
    gui/properties/stringpropertywidget.h
65
    gui/properties/statuspropertywidget.h
66
    gui/properties/transferfunctionpropertywidget.h
67
    tools/qtexteditlog.h
68
    tools/bufferinglog.h
69
)
schultezub's avatar
 
schultezub committed
70

71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

# add additional sources from the activated modules
FOREACH(ModFile ${CampvisModulesApplicationSources})
    # adjust relative path
    SET(ModFileRelative ../modules/${ModFile})
    LIST(APPEND CampvisApplicationSources ${ModFileRelative})
ENDFOREACH()
FOREACH(ModFile ${CampvisModulesApplicationHeaders})
    # adjust relative path
    SET(ModFileRelative ../modules/${ModFile})
    LIST(APPEND CampvisApplicationHeaders ${ModFileRelative})
ENDFOREACH()
FOREACH(ModFile ${CampvisModulesApplicationToBeMocced})
    # adjust relative path
    SET(ModFileRelative ../modules/${ModFile})
    LIST(APPEND CampvisApplicationToBeMocced ${ModFileRelative})
ENDFOREACH()

schultezub's avatar
 
schultezub committed
89
90
91
#
# Qt related stuff:
#
schultezub's avatar
schultezub committed
92
93
QT4_WRAP_CPP(CampvisApplicationMoc ${CampvisApplicationToBeMocced})
LIST(APPEND CampvisApplicationSources ${CampvisApplicationMoc})
94

95
96
QT4_WRAP_UI(CampvisApplicationFormsHeaders ${CampvisApplicationForms})
LIST(APPEND CampvisApplicationSources ${CampvisApplicationFormsHeaders})
97

98
LINK_DIRECTORIES(${CampvisGlobalLinkDirectories} ${CampvisModulesLinkDirectories})
99

100
SET(CampvisMainLibs campvis-core campvis-modules tgt sigslot)
101
102
103
104
105

IF(CAMPVIS_ENABLE_SCRIPTING)
    LIST(APPEND CampvisMainLibs campvis-scripting)
ENDIF(CAMPVIS_ENABLE_SCRIPTING)

106
107
ADD_EXECUTABLE(campvis-application
    ${CampvisApplicationSources} ${CampvisApplicationHeaders}
schultezub's avatar
schultezub committed
108
    ${CampvisApplicationMoc}
109
)
110
ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${CampvisModulesDefinitions} ${CampvisApplicationDefinitions} ${QT_DEFINITIONS})
111
INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs} ${CampvisModulesIncludeDirs})
112
TARGET_LINK_LIBRARIES(campvis-application ${CampvisMainLibs} ${CampvisGlobalExternalLibs} ${CampvisModulesExternalLibs} ${QT_LIBRARIES})
113
114
115
116
117
118

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

119
IF(CAMPVIS_DEPLOY_SHADERS)
120
    LIST(APPEND CampvisShaderDirectories "application/data")
121
122
123
124
125
126
127
128
129
130
    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)