CMakeLists.txt 1.15 KB
Newer Older
Jan Möbius's avatar
 
Jan Möbius committed
1 2 3 4 5 6 7
cmake_minimum_required (VERSION 2.6)

project (OpenFlipper)

# add our macro directory to cmake search path
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)

Jan Möbius's avatar
Jan Möbius committed
8
set (GLUT_ROOT_PATH C:/devel/glut)
Jan Möbius's avatar
 
Jan Möbius committed
9 10

include (common)
Jan Möbius's avatar
Jan Möbius committed
11
include (package)
Jan Möbius's avatar
 
Jan Möbius committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

find_package (OpenGL)
if (NOT OPENGL_FOUND)
  message (FATAL_ERROR "OpengGL not found!")
endif ()

find_package (GLEW)
if (NOT GLEW_FOUND)
  message (FATAL_ERROR "GLEW not found!")
endif ()

find_package (GLUT)
if (NOT GLUT_FOUND)
  message (FATAL_ERROR "GLUT not found!")
endif ()

Jan Möbius's avatar
Jan Möbius committed
28 29
of_set (OPENFLIPPER_PLUGINS "")

Jan Möbius's avatar
 
Jan Möbius committed
30 31 32 33 34 35 36 37
add_subdirectory (OpenMesh/Core)
add_subdirectory (OpenMesh/Tools)
add_subdirectory (ACG)
add_subdirectory (OpenFlipper/PluginLib)
add_subdirectory (OpenFlipper/CoreApp)

add_plugins ()

Jan Möbius's avatar
Jan Möbius committed
38 39 40 41 42 43 44 45 46 47 48
if (APPLE)
  configure_file ("${CMAKE_SOURCE_DIR}/cmake/fixbundle.cmake.in"
     "${CMAKE_BINARY_DIR}/fixbundle.cmake" @ONLY IMMEDIATE)
  add_custom_target (fixbundle ALL
    COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/fixbundle.cmake"
  )
  add_dependencies (fixbundle OpenFlipper PluginLib ${OPENFLIPPER_PLUGINS})

  # install
  install (DIRECTORY ${CMAKE_BINARY_DIR}/Build/OpenFlipper.app DESTINATION .)
endif ()