CMakeLists.txt 4.6 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
53
    gui/properties/datanamepropertywidget.h
schultezub's avatar
schultezub committed
54
    gui/properties/intpropertywidget.h
schultezub's avatar
schultezub committed
55
    gui/properties/floatpropertywidget.h
Hossain Mahmud's avatar
Hossain Mahmud committed
56
    gui/properties/colorpropertywidget.h
schultezub's avatar
schultezub committed
57
    gui/properties/geometry1dtransferfunctioneditor.h
58
    gui/properties/geometry2dtransferfunctioneditor.h
59
    gui/properties/metapropertywidget.h
60
    gui/properties/optionpropertywidget.h
schultezub's avatar
schultezub committed
61
    gui/properties/propertycollectionwidget.h
schultezub's avatar
schultezub committed
62
    gui/properties/simpletransferfunctioneditor.h
schultezub's avatar
schultezub committed
63
    gui/properties/stringpropertywidget.h
64
    gui/properties/statuspropertywidget.h
65
    gui/properties/transferfunctionpropertywidget.h
66
    tools/qtexteditlog.h
67
    tools/bufferinglog.h
68
)
schultezub's avatar
 
schultezub committed
69

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

# 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
88
89
90
#
# Qt related stuff:
#
schultezub's avatar
schultezub committed
91
92
QT4_WRAP_CPP(CampvisApplicationMoc ${CampvisApplicationToBeMocced})
LIST(APPEND CampvisApplicationSources ${CampvisApplicationMoc})
93

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

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

99
SET(CampvisMainLibs campvis-core campvis-modules cgt sigslot)
100
101
102
103
104

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

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

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

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


# copy over Lua stuff
ADD_CUSTOM_COMMAND(
    TARGET campvis-application
    COMMAND ${CMAKE_COMMAND} -E copy "${CampvisHome}/application/lua/inspect.lua" "$<TARGET_FILE_DIR:campvis-application>/lua-mods/inspect.lua"
)