-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathCMakeLists.txt
81 lines (68 loc) · 2.73 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
PROJECT(TexGen)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
#This will prevent a bunch of warnings when compiling under MSVC8, the second define stops
#swig from redefining the same macro causing additional warnings
ADD_DEFINITIONS(-DSWIG_NO_CRT_SECURE_NO_DEPRECATE)
IF(MSVC80)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
ENDIF(MSVC80)
# the -Wall addition returns warnings for everything (removed because produces
# some unnecessary warnings making it hard to spot the useful warnings)
# -Wno-deprecated filters out the known warning that VTK throws up as it uses
# an old style stl header
IF(UNIX)
ADD_DEFINITIONS(-Wno-deprecated -fPIC)
ENDIF(UNIX)
# ADD_DEFINITIONS(-DTIXML_USE_STL)
IF(WIN32)
SET(REAL_OUTPUT_PATH ${TexGen_BINARY_DIR}/$(OutDir))
ELSE(WIN32)
SET(REAL_OUTPUT_PATH ${TexGen_BINARY_DIR})
ENDIF(WIN32)
SET(BUILD_RENDERER ON CACHE BOOL "Enable rendering using VTK.")
SET(BUILD_PYTHON_INTERFACE ON CACHE BOOL "Enable the Python interface.")
SET(BUILD_GUI ON CACHE BOOL "Build the graphical user interface.")
SET(BUILD_EXAMPLES OFF CACHE BOOL "Build the examples.")
SET(BUILD_UNIT_TESTS OFF CACHE BOOL "Build the unit tests to ensure the software is working as expected.")
SET(BUILD_CASCADE_EXPORT OFF CACHE BOOL "Build module to export geometry to Open CASCADE.")
SET(BUILD_SHARED ON CACHE BOOL "Build shared libraries")
SET(BUILD_DOCUMENTATION OFF CACHE BOOL "Build documentation using doxygen")
SET(BUILD_PROFILE OFF CACHE BOOL "Build profiling")
IF(BUILD_GUI)
IF(NOT BUILD_RENDERER)
MESSAGE("The renderer is needed in order to build the graphical user interface.\nSet BUILD_RENDERER ON.")
ENDIF(NOT BUILD_RENDERER)
IF(NOT BUILD_PYTHON_INTERFACE)
MESSAGE("The Python interface is needed in order to build the graphical user interface.\nSet BUILD_PYTHON_INTERFACE ON.")
ENDIF(NOT BUILD_PYTHON_INTERFACE)
ENDIF(BUILD_GUI)
SUBDIRS(Core Triangle Octree tinyxml CSparse tetgenlib LatinHypercube)
IF(BUILD_RENDERER)
SUBDIRS(Renderer)
ENDIF(BUILD_RENDERER)
IF(BUILD_CASCADE_EXPORT)
SUBDIRS(Export)
ENDIF(BUILD_CASCADE_EXPORT)
IF(BUILD_PYTHON_INTERFACE)
SUBDIRS(Python)
ENDIF(BUILD_PYTHON_INTERFACE)
IF(BUILD_GUI)
SUBDIRS(GUI)
ENDIF(BUILD_GUI)
IF(BUILD_EXAMPLES)
SUBDIRS(Examples)
ENDIF(BUILD_EXAMPLES)
IF(BUILD_UNIT_TESTS)
SUBDIRS(UnitTests)
ENDIF(BUILD_UNIT_TESTS)
#IF(BUILD_DOCUMENTATION)
# SUBDIRS(Docs)
#ENDIF(BUILD_DOCUMENTATION)
IF(BUILD_PROFILE)
SUBDIRS(ProfileTests)
ENDIF(BUILD_PROFILE)
SET(LIBRARY_OUTPUT_PATH ${TexGen_BINARY_DIR} CACHE INTERNAL "Single output directory for building all libraries.")
SET(EXECUTABLE_OUTPUT_PATH ${TexGen_BINARY_DIR} CACHE INTERNAL "Single output directory for building all executables.")
CONFIGURE_FILE(${TexGen_SOURCE_DIR}/TexGenConfig.cmake.in
${TexGen_BINARY_DIR}/TexGenConfig.cmake )
#@ONLY IMMEDIATE