Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

CMakeLists.txt 4.67 KB
Newer Older
schultezub's avatar
schultezub committed
1
#
schultezub's avatar
schultezub committed
2
# CAMPVis - Yet another visualization framework
schultezub's avatar
schultezub committed
3
4
5
# CMake file inspired by Voreen
#

schultezub's avatar
schultezub committed
6
PROJECT(CAMPVis)
schultezub's avatar
schultezub committed
7
8
9
10
11
12
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)

#
# Global Build Options
#

13
OPTION(BUILD_SHARED_LIBS            "Build shared libraries?"                                       ON)
14
15
16
17
18
#OPTION(CAMPVIS_PRECOMPILED_HEADER   "Use pre-compiled headers?"                                     ON)
OPTION(CAMPVIS_DEBUG                "Activate debug code?"                                          ON)
OPTION(CAMPVIS_BUILD_APPLICATION    "Build CAMPVis Application"                                     ON)
OPTION(CAMPVIS_BUILD_CORE           "Build CAMPVis Core"                                            ON)
OPTION(CAMPVIS_BUILD_MODULES        "Build CAMPVis Modules"                                         ON)
19
OPTION(CAMPVIS_ENABLE_SCRIPTING     "Add support for scripting CAMPVis using Lua"                   OFF)
20
OPTION(CAMPVIS_BUILD_LIB_TGT        "Build TGT Library"                                             ON)
Artur Grunau's avatar
Artur Grunau committed
21
OPTION(CAMPVIS_BUILD_LIB_LUA        "Build Lua Library"                                             OFF)
22
OPTION(CAMPVIS_BUILD_DOXYGEN        "Build Doxygen Documentation"                                   OFF)
23
24

OPTION(CAMPVIS_DEPLOY_SHADERS       "Deploy Shader files to binary directory"                       OFF)
25
OPTION(CAMPVIS_GROUP_SOURCE_FILES   "Group source files by directory"                               ON)
26
27
OPTION(CAMPVIS_BUILD_GOOGLETEST     "Build googletest library"                                      OFF)
OPTION(CAMPVIS_BUILD_TEST_SOURCES   "Build Unit Tests of gooogletest"                               OFF)
schultezub's avatar
schultezub committed
28
29

IF(WIN32)
30
31
    OPTION(CAMPVIS_COPY_EXTERNAL_DLLS   "Copy external DLLs to bin directory?"                      ON)
    OPTION(CAMPVIS_INCREMENTAL_LINKING  "Enable incremental linking in Visual Studio debug builds?" ON)
schultezub's avatar
schultezub committed
32
    OPTION(CAMPVIS_GENERATE_MANIFEST    "Generate manifest in Visual Studio debug builds (switch on when encountering errors using incremental linking)?"          OFF)
schultezub's avatar
schultezub committed
33
34
ENDIF()

35
36
37
SET(CAMPVIS_DEFAULT_ENABLED_MODULES "STABLE_NO_DEPENDENCIES" CACHE STRING "Default CAMPVis modules to activate")
SET_PROPERTY(CACHE CAMPVIS_DEFAULT_ENABLED_MODULES PROPERTY STRINGS "NONE" "STABLE_NO_DEPENDENCIES" "STABLE_WITH_EXTERNAL_DEPENDENCIES" "TESTING" "ALL")

schultezub's avatar
schultezub committed
38
39
40
41
#
# Further Build Configurations
#
include(cmake/commonconf.cmake)
42
include(cmake/parseModulesDir.cmake)
schultezub's avatar
schultezub committed
43

44
45
MESSAGE(STATUS "--------------------------------------------------------------------------------")

schultezub's avatar
schultezub committed
46
IF(CAMPVIS_BUILD_LIB_TGT)
47
    ADD_SUBDIRECTORY(ext/cgt)
48
    ADD_SUBDIRECTORY(ext/sigslot)
schultezub's avatar
schultezub committed
49
50
ENDIF()

Artur Grunau's avatar
Artur Grunau committed
51
IF(CAMPVIS_BUILD_LIB_LUA)
52
53
54
55
    IF(WIN32)
        # Keep LUA_BUILD_AS_DLL in sync with BUILD_SHARED_LIBS
        SET(LUA_BUILD_AS_DLL ${BUILD_SHARED_LIBS} CACHE BOOL "Build Lua library as DLL" FORCE)
    ENDIF(WIN32)
56

57
    ADD_SUBDIRECTORY(ext/lua EXCLUDE_FROM_ALL)
58
59
60
61
62

    # If the above command failed, provide a hint how to fix the problem
    IF(NOT TARGET liblua)
        MESSAGE(SEND_ERROR "Did you forget to run `git submodule update --init`?")
    ENDIF(NOT TARGET liblua)
Artur Grunau's avatar
Artur Grunau committed
63
64
ENDIF()

schultezub's avatar
schultezub committed
65
IF(CAMPVIS_BUILD_CORE)
schultezub's avatar
schultezub committed
66
67
68
    ADD_SUBDIRECTORY(core)
ENDIF()

schultezub's avatar
schultezub committed
69
IF(CAMPVIS_BUILD_MODULES)
schultezub's avatar
   
schultezub committed
70
71
72
    ADD_SUBDIRECTORY(modules)
ENDIF()

73

74
IF(CAMPVIS_ENABLE_SCRIPTING)
75
76
77
78
79
80
81
82
83
84
85
    # First, find Lua to setup paths for all projects correctly
    FIND_PACKAGE(Lua REQUIRED)
    IF(LUA_FOUND)
        MESSAGE(STATUS "* Found Lua")
        LIST(APPEND CampvisGlobalDefinitions ${LUA_DEFINITIONS})
        LIST(APPEND CampvisGlobalIncludeDirs ${LUA_INCLUDE_DIR})
        LIST(APPEND CampvisGlobalExternalLibs ${LUA_LIBRARY})
    ELSE(LUA_FOUND)
        MESSAGE(FATAL_ERROR "Lua not found!")
    ENDIF(LUA_FOUND)
    
86
87
88
89
    ADD_SUBDIRECTORY(scripting)
    LIST(APPEND CampvisGlobalDefinitions "-DCAMPVIS_HAS_SCRIPTING")
ENDIF()

schultezub's avatar
schultezub committed
90
IF(CAMPVIS_BUILD_APPLICATION)
schultezub's avatar
   
schultezub committed
91
92
93
    ADD_SUBDIRECTORY(application)
ENDIF()

94
95
96
97
98
99
100
101
IF(CAMPVIS_BUILD_GOOGLETEST)
    ADD_SUBDIRECTORY(ext/gtest-1.7.0)
ENDIF()

IF(CAMPVIS_BUILD_TEST_SOURCES)
    ADD_SUBDIRECTORY(test)
ENDIF()

102
103
104
105
IF(CAMPVIS_BUILD_DOXYGEN)
    ADD_SUBDIRECTORY(doc EXCLUDE_FROM_ALL)
ENDIF()

106

schultezub's avatar
schultezub committed
107
108
109
110
#
# Copy External DLLs
#
IF(WIN32)
schultezub's avatar
schultezub committed
111
    # gather Qt4 DLLs - TODO: remove redundant naming of required components 
112
    FIND_PACKAGE(Qt4DLLs COMPONENTS QtCore QtGui QtOpenGL QtNetwork QtXmlPatterns)
schultezub's avatar
schultezub committed
113
114
115
    LIST(APPEND CampvisExternalDllsDebug ${QT_DEBUG_DLLS})
    LIST(APPEND CampvisExternalDllsRelease ${QT_RELEASE_DLLS})

schultezub's avatar
schultezub committed
116
117
    LIST(REMOVE_DUPLICATES CampvisExternalDllsDebug)
    LIST(REMOVE_DUPLICATES CampvisExternalDllsRelease)
schultezub's avatar
schultezub committed
118

schultezub's avatar
schultezub committed
119
    IF(CAMPVIS_COPY_EXTERNAL_DLLS)
schultezub's avatar
schultezub committed
120
        COPY_EXTERNAL_DLLS(CampvisExternalDllsDebug CampvisExternalDllsRelease false)
schultezub's avatar
schultezub committed
121
122
    ENDIF()
ENDIF()