CMakeLists.txt 1.37 KB
Newer Older
Mike Kremer's avatar
Mike Kremer committed
1
2
cmake_minimum_required (VERSION 2.6)

3

4
5
6
if("${PROJECT_NAME}" STREQUAL "")
    message("Setting project name to OpenVolumeMesh")
    project (OpenVolumeMesh)
7
8
9

    set(CMAKE_MACOSX_RPATH 1)

10
endif()
Mike Kremer's avatar
Mike Kremer committed
11
12

# add our macro directory to cmake search path
13
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
Max Lyon's avatar
Max Lyon committed
14
set (CMAKE_DEBUG_POSTFIX "d")
Mike Kremer's avatar
Mike Kremer committed
15

Jan Möbius's avatar
Jan Möbius committed
16
17
# Enable bigobj on MSVC Windows debug mode
if ( MSVC )
Jan Möbius's avatar
Typo    
Jan Möbius committed
18
   add_compile_options("$<IF:$<CXX_COMPILER_ID:MSVC>,$<$<CONFIG:DEBUG>:/bigobj>> >")
Jan Möbius's avatar
Jan Möbius committed
19
20
21
endif()


Mike Kremer's avatar
Mike Kremer committed
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# include our cmake files
include (ACGCommon)

acg_get_version ()

include (ACGOutput)

if (WIN32)
  add_definitions(
      -D_USE_MATH_DEFINES -DNOMINMAX
  )
endif ()

# ========================================================================
# Call the subdirectories with the projects
# ========================================================================

add_subdirectory (src)
40
41
42
43
44
45
46

# Only add examples and doc to build target if OpenVolumeMesh
# is not built as external library only
if(${PROJECT_NAME} MATCHES "OpenVolumeMesh")
    add_subdirectory (examples)
    add_subdirectory (documentation)
endif()
Mike Kremer's avatar
Mike Kremer committed
47
48
49
50
51
52
53

# ========================================================================
# Bundle generation (Targets exist, now configure them)
# ========================================================================

# display results
acg_print_configure_header (OPENVOLUMEMESH "OpenVolumeMesh")