CMakeLists.txt 2.41 KB
Newer Older
schultezub's avatar
schultezub committed
1
2
3
4
5
6
7
8
9
10
11
12
13
#
# TUMVis - Yet another visualization framework
# CMake file inspired by Voreen
#

PROJECT(TUMVis)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)

#
# Global Build Options
#

OPTION(TUMVIS_SHARED_LIBS          "Build shared libraries?"                                       ON )
14
#OPTION(TUMVIS_PRECOMPILED_HEADER   "Use pre-compiled headers?"                                     ON )
schultezub's avatar
schultezub committed
15
OPTION(TUMVIS_DEBUG                "Activate debug code?"                                          ON )
schultezub's avatar
   
schultezub committed
16
OPTION(TUMVIS_BUILD_APPLICATION    "Build TUMVis Application"                                      ON )
schultezub's avatar
schultezub committed
17
OPTION(TUMVIS_BUILD_CORE           "Build TUMVis Core"                                             ON )
schultezub's avatar
   
schultezub committed
18
OPTION(TUMVIS_BUILD_MODULES        "Build TUMVis Modules"                                          ON )
schultezub's avatar
schultezub committed
19
OPTION(TUMVIS_BUILD_LIB_TGT        "Build TGT Library"                                             ON )
20
OPTION(TUMVIS_BUILD_LIB_CLLIB      "Build CLLib Library"                                           ON )
schultezub's avatar
schultezub committed
21
22
23
24

IF(WIN32)
    OPTION(TUMVIS_COPY_EXTERNAL_DLLS   "Copy external DLLs to bin directory?"                      ON )
    OPTION(TUMVIS_INCREMENTAL_LINKING  "Enable incremental linking in Visual Studio debug builds?" ON )
25
    OPTION(TUMVIS_GENERATE_MANIFEST    "Generate manifest in Visual Studio debug builds (switch on when encountering errors using incremental linking)?"          OFF)
schultezub's avatar
schultezub committed
26
27
28
29
30
31
32
33
34
35
36
37
ENDIF()

#
# Further Build Configurations
#

include(cmake/commonconf.cmake)

IF(TUMVIS_BUILD_LIB_TGT)
    ADD_SUBDIRECTORY(ext/tgt)
ENDIF()

38
39
40
41
IF(TUMVIS_BUILD_LIB_CLLIB)
    ADD_SUBDIRECTORY(ext/cllib)
ENDIF()

schultezub's avatar
schultezub committed
42
43
44
45
IF(TUMVIS_BUILD_CORE)
    ADD_SUBDIRECTORY(core)
ENDIF()

schultezub's avatar
   
schultezub committed
46
47
48
49
50
51
52
53
IF(TUMVIS_BUILD_MODULES)
    ADD_SUBDIRECTORY(modules)
ENDIF()

IF(TUMVIS_BUILD_APPLICATION)
    ADD_SUBDIRECTORY(application)
ENDIF()

schultezub's avatar
schultezub committed
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#
# Copy External DLLs
#
IF(WIN32)
    LIST(REMOVE_DUPLICATES TUMVIS_EXTERNAL_DEBUG_DLLS)
    LIST(REMOVE_DUPLICATES TUMVIS_EXTERNAL_RELEASE_DLLS)

    IF(TUMVIS_COPY_EXTERNAL_DLLS)
        COPY_EXTERNAL_DLLS(TUMVIS_EXTERNAL_DEBUG_DLLS TUMVIS_EXTERNAL_RELEASE_DLLS false)
    ENDIF()
    
    IF(TUMVIS_ADD_INSTALL_TARGET)
        INSTALL(FILES ${TUMVIS_EXTERNAL_DEBUG_DLLS} 
            DESTINATION .
            CONFIGURATIONS Debug
        )
        INSTALL(FILES ${TUMVIS_EXTERNAL_RELEASE_DLLS}
            DESTINATION .
            CONFIGURATIONS Release
        )
    ENDIF()
ENDIF()