CMakeLists.txt 1.66 KB
Newer Older
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
include (ACGCommon)

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

# source code directories
set (directories 
  . 
  Decimater
  Smoother
  Subdivider/Adaptive/Composite
  Subdivider/Uniform/Composite 
  Subdivider/Uniform
  Utils
)

# collect all header and source files
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})

IF(WIN32)
  acg_append_files (sources "*.c" ${directories})
ENDIF(WIN32)

if (WIN32)
  # OpenMesh has no dll exports so we have to build a static library on windows
  acg_add_library (OpenMeshTools STATIC ${sources} ${headers})
else ()
31
  acg_add_library (OpenMeshTools SHAREDANDSTATIC ${sources} ${headers})
32 33 34 35
endif ()

target_link_libraries (OpenMeshTools OpenMeshCore)

36 37 38 39 40
IF( NOT WIN32 )
  target_link_libraries (OpenMeshToolsStatic OpenMeshCoreStatic)
ENDIF(NOT WIN32)

if (NOT ACG_PROJECT_MACOS_BUNDLE OR NOT APPLE)
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
# Install Header Files
install(DIRECTORY .
        DESTINATION include/OpenMesh/Tools
        FILES_MATCHING
        PATTERN "*.hh"
        PATTERN "CVS" EXCLUDE
        PATTERN ".svn" EXCLUDE
        PATTERN "tmp" EXCLUDE
        PATTERN "Templates" EXCLUDE
        PATTERN "Debian*" EXCLUDE)

#install Template cc files (required by headers)
install(DIRECTORY .
        DESTINATION include/OpenMesh/Tools
        FILES_MATCHING
        PATTERN "*T.cc"
        PATTERN "CVS" EXCLUDE
        PATTERN ".svn" EXCLUDE
        PATTERN "tmp" EXCLUDE
        PATTERN "Templates" EXCLUDE
        PATTERN "Debian*" EXCLUDE)
62
endif ()
63 64 65 66 67

#install the config file
install(FILES Utils/getopt.h DESTINATION include/OpenMesh/Tools/Utils)