CMakeLists.txt 1.83 KB
Newer Older
schultezub's avatar
schultezub committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
# 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 )
OPTION(TUMVIS_PRECOMPILED_HEADER   "Use pre-compiled headers?"                                     ON )
OPTION(TUMVIS_DEBUG                "Activate debug code?"                                          ON )
schultezub's avatar
schultezub committed
16
OPTION(TUMVIS_BUILD_CORE           "Build TUMVis Core"                                             ON )
schultezub's avatar
schultezub committed
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 )
    OPTION(TUMVIS_GENERATE_MANIFEST    "Generate manifest in Visual Studio debug builds?"          OFF)
ENDIF()

#
# Further Build Configurations
#

include(cmake/commonconf.cmake)

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

schultezub's avatar
schultezub committed
35
36
37
38
IF(TUMVIS_BUILD_CORE)
    ADD_SUBDIRECTORY(core)
ENDIF()

schultezub's avatar
schultezub committed
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#
# 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()