CMakeLists.txt 944 Bytes
Newer Older
Jan Möbius's avatar
Jan Möbius committed
1
2
3
4
5
6
7
include (common)

include_directories (
  ../..
  ${CMAKE_CURRENT_SOURCE_DIR}
)

Jan Möbius's avatar
Jan Möbius committed
8
# source code directories
Jan Möbius's avatar
Jan Möbius committed
9
10
11
12
13
14
15
16
17
18
set (directories 
  . 
  Decimater
  Smoother
  Subdivider/Adaptive/Composite
  Subdivider/Uniform/Composite 
  Subdivider/Uniform
  Utils
)

Jan Möbius's avatar
Jan Möbius committed
19
# collect all header and source files
Jan Möbius's avatar
Jan Möbius committed
20
21
22
append_files (headers "*.hh" ${directories})
append_files (sources "*.cc" ${directories})

23
if (WIN32)
Jan Möbius's avatar
Jan Möbius committed
24
25
  # OpenMesh has no dll exports so we have to build a static library on windows
  add_library (OpenMeshTools STATIC ${sources} ${headers})
26
else ()
Jan Möbius's avatar
Jan Möbius committed
27
28
29
30
31
32
  add_library (OpenMeshTools SHARED ${sources} ${headers})
  # no install on mac, because the whole bundle will be installed in the
  # toplevel CMakeLists.txt
  if (NOT APPLE)
    install (TARGETS OpenMeshTools DESTINATION ${OPENFLIPPER_LIBDIR})
  endif ()
33
34
endif ()

Jan Möbius's avatar
Jan Möbius committed
35
36
target_link_libraries (OpenMeshTools OpenMeshCore)

Jan Möbius's avatar
Jan Möbius committed
37
# set common target properties defined in common.cmake
38
set_target_props (OpenMeshTools)