Commit f53aa94a authored by Jan Möbius's avatar Jan Möbius
Browse files

Updated free branch cmakefile


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6564 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 01ae8636
cmake_minimum_required (VERSION 2.6) cmake_minimum_required (VERSION 2.6)
project (OpenFlipper) project (OpenFlipper)
# add our macro directory to cmake search path # add our macro directory to cmake search path
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
# include our cmake files # include our cmake files
include (ACGCommon) include (ACGCommon)
acg_get_version () acg_get_version ()
acg_get_version (OpenMesh)
include (package)
include (ACGOutput) include (package)
include (ACGOutput)
acg_qt4 (REQUIRED 4.5)
acg_openmp () acg_qt4 (REQUIRED 4.5)
acg_ftgl () acg_openmp ()
acg_ftgl ()
# check for OpenGL, GLEW and GLUT as our required dependencies
find_package (OpenGL) # check for OpenGL, GLEW and GLUT as our required dependencies
if (NOT OPENGL_FOUND) find_package (OpenGL)
message (FATAL_ERROR "OpengGL not found!") if (NOT OPENGL_FOUND)
endif () message (FATAL_ERROR "OpengGL not found!")
endif ()
find_package (GLEW)
if (NOT GLEW_FOUND) find_package (GLEW)
message (FATAL_ERROR "GLEW not found!") if (NOT GLEW_FOUND)
endif () message (FATAL_ERROR "GLEW not found!")
endif ()
find_package (GLUT)
if (NOT GLUT_FOUND) find_package (GLUT)
message (FATAL_ERROR "GLUT not found!") if (NOT GLUT_FOUND)
endif () message (FATAL_ERROR "GLUT not found!")
endif ()
# start with an empty plugin list
acg_set (OPENFLIPPER_PLUGINS "") # start with an empty plugin list
acg_set (OPENFLIPPER_PLUGINS "")
# add the basic componenets
add_subdirectory (OpenMesh/src/OpenMesh/Core) # add the basic componenets
add_subdirectory (OpenMesh/src/OpenMesh/Tools) add_subdirectory (OpenMesh/src/OpenMesh/Core)
add_subdirectory (ACG) add_subdirectory (OpenMesh/src/OpenMesh/Tools)
add_subdirectory (OpenFlipper/PluginLib) add_subdirectory (ACG)
add_subdirectory (OpenFlipper/CoreApp) add_subdirectory (OpenFlipper/PluginLib)
add_subdirectory (OpenFlipper/CoreApp)
if( EXISTS "${CMAKE_SOURCE_DIR}/PhySim/CMakeLists.txt" )
add_subdirectory (PhySim) if( EXISTS "${CMAKE_SOURCE_DIR}/PhySim/CMakeLists.txt" )
endif() add_subdirectory (PhySim)
endif()
# add plugins
of_add_plugins () # add plugins
of_add_plugins ()
if (APPLE)
# prepare bundle generation cmake file and add a build target for it if (APPLE)
configure_file ("${CMAKE_SOURCE_DIR}/OpenFlipper/cmake/fixbundle.cmake.in" # prepare bundle generation cmake file and add a build target for it
"${CMAKE_BINARY_DIR}/fixbundle.cmake" @ONLY IMMEDIATE) configure_file ("${CMAKE_SOURCE_DIR}/OpenFlipper/cmake/fixbundle.cmake.in"
add_custom_target (fixbundle ALL "${CMAKE_BINARY_DIR}/fixbundle.cmake" @ONLY IMMEDIATE)
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/fixbundle.cmake" add_custom_target (fixbundle ALL
) COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/fixbundle.cmake"
# let bundle generation depend on all targets )
add_dependencies (fixbundle OpenFlipper PluginLib ${OPENFLIPPER_PLUGINS}) # let bundle generation depend on all targets
add_dependencies (fixbundle OpenFlipper PluginLib ${OPENFLIPPER_PLUGINS})
# install bundle
install (DIRECTORY ${CMAKE_BINARY_DIR}/Build/OpenFlipper.app DESTINATION .) # install bundle
endif () install (DIRECTORY ${CMAKE_BINARY_DIR}/Build/OpenFlipper.app DESTINATION .
USE_SOURCE_PERMISSIONS)
# display results endif ()
acg_print_configure_header ("OpenFlipper")
of_print_plugin_stats () # display results
acg_print_configure_footer () acg_print_configure_header (OPENFLIPPER "OpenFlipper")
of_print_plugin_stats ()
acg_print_configure_footer ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment