16.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.67 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
)

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

47
48
LIST(APPEND CampvisApplicationDefinitions "-DCAMPVIS_SOURCE_DIR=\"${CampvisHome}\"")

schultezub's avatar
   
schultezub committed
49
50
51
#
# Qt related stuff:
#
schultezub's avatar
schultezub committed
52
53
54
FIND_PACKAGE(Qt4 ${CampvisRequiredQtVersion} REQUIRED QtCore QtGui QtOpenGL)
QT4_WRAP_CPP(CampvisApplicationMoc ${CampvisApplicationToBeMocced})
LIST(APPEND CampvisApplicationSources ${CampvisApplicationMoc})
schultezub's avatar
   
schultezub committed
55
INCLUDE(${QT_USE_FILE})
56

57
LINK_DIRECTORIES(${CampvisGlobalLinkDirectories} ${CampvisModulesLinkDirectories})
58

schultezub's avatar
schultezub committed
59
ADD_EXECUTABLE(campvis-application 
schultezub's avatar
schultezub committed
60
61
    ${CampvisApplicationSources} ${CampvisApplicationHeaders} 
    ${CampvisApplicationMoc}
schultezub's avatar
   
schultezub committed
62
) 
63
ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${CampvisModulesDefinitions} ${CampvisApplicationDefinitions} ${QT_DEFINITIONS})
64
65
INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs} ${CampvisModulesIncludeDirs})
TARGET_LINK_LIBRARIES(campvis-application campvis-core campvis-modules tgt ${CampvisGlobalExternalLibs} ${CampvisModulesExternalLibs} ${QT_LIBRARIES})
66
67
68
69
70
71
72
73
74
75
76
77

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)