CMakeLists.txt 2.24 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
20
21
22
23
OPTION(TUMVIS_BUILD_LIB_TGT        "Build TGT Library"                                             ON )

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 )
24
    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
25
26
27
28
29
30
31
32
33
34
35
36
ENDIF()

#
# Further Build Configurations
#

include(cmake/commonconf.cmake)

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

schultezub's avatar
schultezub committed
37
38
39
40
IF(TUMVIS_BUILD_CORE)
    ADD_SUBDIRECTORY(core)
ENDIF()

schultezub's avatar
   
schultezub committed
41
42
43
44
45
46
47
48
IF(TUMVIS_BUILD_MODULES)
    ADD_SUBDIRECTORY(modules)
ENDIF()

IF(TUMVIS_BUILD_APPLICATION)
    ADD_SUBDIRECTORY(application)
ENDIF()

schultezub's avatar
schultezub committed
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#
# 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()