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

Propagate windows bundle changes to other branches

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10710 383ad7c9-94d9-4d36-a494-682f7c89f535
parent d8740b08
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) acg_get_version (OpenMesh)
include (package) include (package)
include (ACGOutput) include (ACGOutput)
acg_qt4 (REQUIRED 4.5) acg_qt4 (REQUIRED 4.5)
acg_openmp () acg_openmp ()
acg_ftgl () acg_ftgl ()
# check for OpenGL, GLEW and GLUT as our required dependencies # check for OpenGL, GLEW and GLUT as our required dependencies
find_package (OpenGL) find_package (OpenGL)
if (NOT OPENGL_FOUND) if (NOT OPENGL_FOUND)
message (FATAL_ERROR "OpengGL not found!") message (FATAL_ERROR "OpengGL not found!")
endif () endif ()
find_package (GLEW) find_package (GLEW)
if (NOT GLEW_FOUND) if (NOT GLEW_FOUND)
message (FATAL_ERROR "GLEW not found!") message (FATAL_ERROR "GLEW not found!")
endif () endif ()
find_package (GLUT) find_package (GLUT)
if (NOT GLUT_FOUND) if (NOT GLUT_FOUND)
message (FATAL_ERROR "GLUT not found!") message (FATAL_ERROR "GLUT not found!")
endif () endif ()
# ======================================================================== # ========================================================================
# Core Components # Core Components
# ======================================================================== # ========================================================================
add_subdirectory (OpenMesh/src/OpenMesh/Core) add_subdirectory (OpenMesh/src/OpenMesh/Core)
add_subdirectory (OpenMesh/src/OpenMesh/Tools) add_subdirectory (OpenMesh/src/OpenMesh/Tools)
add_subdirectory (ACG) add_subdirectory (ACG)
add_subdirectory (OpenFlipper/PluginLib) add_subdirectory (OpenFlipper/PluginLib)
add_subdirectory (OpenFlipper/CoreApp) add_subdirectory (OpenFlipper/CoreApp)
# ======================================================================== # ========================================================================
# Documentation generators # Documentation generators
# ======================================================================== # ========================================================================
# Create dirs to make doxygen happy # Create dirs to make doxygen happy
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc ) file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc )
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Help ) file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Help )
# Add the deocumentation targets # Add the deocumentation targets
add_subdirectory (OpenFlipper/Documentation/DeveloperTarget) add_subdirectory (OpenFlipper/Documentation/DeveloperTarget)
add_subdirectory (OpenFlipper/Documentation/UserTarget) add_subdirectory (OpenFlipper/Documentation/UserTarget)
# ======================================================================== # ========================================================================
# Build all additional libraries # Build all additional libraries
# ======================================================================== # ========================================================================
# search all libs in the libs directory # search all libs in the libs directory
file ( file (
GLOB _local_libs_in GLOB _local_libs_in
RELATIVE "${CMAKE_SOURCE_DIR}" RELATIVE "${CMAKE_SOURCE_DIR}"
"${CMAKE_SOURCE_DIR}/libs/*/CMakeLists.txt" "${CMAKE_SOURCE_DIR}/libs/*/CMakeLists.txt"
) )
# add all found libs to the build # add all found libs to the build
foreach (_localLib ${_local_libs_in}) foreach (_localLib ${_local_libs_in})
get_filename_component (_local_lib_dir ${_localLib} PATH) get_filename_component (_local_lib_dir ${_localLib} PATH)
add_subdirectory (${CMAKE_SOURCE_DIR}/${_local_lib_dir}) add_subdirectory (${CMAKE_SOURCE_DIR}/${_local_lib_dir})
endforeach () endforeach ()
# ======================================================================== # ========================================================================
# Plugins # Plugins
# ======================================================================== # ========================================================================
# start with an empty plugin list # start with an empty plugin list
acg_set (OPENFLIPPER_PLUGINS "") acg_set (OPENFLIPPER_PLUGINS "")
# add plugins # add plugins
of_add_plugins () of_add_plugins ()
# ========================================================================
# Bundle generation # ========================================================================
# ======================================================================== # Bundle generation
# ========================================================================
if (WIN32 )
# prepare bundle generation cmake file and add a build target for it if (WIN32 )
configure_file ("${CMAKE_SOURCE_DIR}/OpenFlipper/cmake/fixbundle.cmake.win.in" # Plugins collected a list of required libdirs for getting
"${CMAKE_BINARY_DIR}/fixbundle.win.cmake" @ONLY IMMEDIATE) # their DLLS on windows:
get_property( WINDOWS_COPY_LIBDIRS GLOBAL PROPERTY WINDOWS_LIBRARY_DIR_LIST )
add_custom_target (fixbundle ALL list(REMOVE_DUPLICATES WINDOWS_COPY_LIBDIRS)
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/fixbundle.win.cmake" )
# prepare bundle generation cmake file and add a build target for it
# let bundle generation depend on all targets configure_file ("${CMAKE_SOURCE_DIR}/OpenFlipper/cmake/fixbundle.cmake.win.in"
add_dependencies (fixbundle OpenFlipper PluginLib ${OPENFLIPPER_PLUGINS}) "${CMAKE_BINARY_DIR}/fixbundle.win.cmake" @ONLY IMMEDIATE)
endif(WIN32) add_custom_target (fixbundle ALL
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/fixbundle.win.cmake" )
if (APPLE) # let bundle generation depend on all targets
# prepare bundle generation cmake file and add a build target for it add_dependencies (fixbundle OpenFlipper PluginLib ${OPENFLIPPER_PLUGINS})
configure_file ("${CMAKE_SOURCE_DIR}/OpenFlipper/cmake/fixbundle.cmake.in"
"${CMAKE_BINARY_DIR}/fixbundle.cmake" @ONLY IMMEDIATE) endif(WIN32)
add_custom_target (fixbundle ALL
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/fixbundle.cmake"
) if (APPLE)
# let bundle generation depend on all targets # prepare bundle generation cmake file and add a build target for it
add_dependencies (fixbundle OpenFlipper PluginLib ${OPENFLIPPER_PLUGINS}) configure_file ("${CMAKE_SOURCE_DIR}/OpenFlipper/cmake/fixbundle.cmake.in"
"${CMAKE_BINARY_DIR}/fixbundle.cmake" @ONLY IMMEDIATE)
# install bundle add_custom_target (fixbundle ALL
install (DIRECTORY ${CMAKE_BINARY_DIR}/Build/OpenFlipper.app DESTINATION . COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/fixbundle.cmake"
USE_SOURCE_PERMISSIONS) )
endif () # let bundle generation depend on all targets
add_dependencies (fixbundle OpenFlipper PluginLib ${OPENFLIPPER_PLUGINS})
# ======================================================================== # install bundle
# Output log information install (DIRECTORY ${CMAKE_BINARY_DIR}/Build/OpenFlipper.app DESTINATION .
# ======================================================================== USE_SOURCE_PERMISSIONS)
endif ()
# display results
acg_print_configure_header (OPENFLIPPER "OpenFlipper")
of_print_plugin_stats () # ========================================================================
acg_print_configure_footer () # Output log information
# ========================================================================
# display results
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