iOnly build bundles in standalone mode
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@506 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -35,18 +35,23 @@ if ( NOT DEFINED BUILD_APPS )
|
|||||||
set( BUILD_APPS true CACHE BOOL "Enable or disable building of apps" )
|
set( BUILD_APPS true CACHE BOOL "Enable or disable building of apps" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
# Only call fixbundle, when we are building OpenMesh standalone
|
||||||
if ( NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" AND BUILD_APPS )
|
if(${PROJECT_NAME} MATCHES "OpenMesh")
|
||||||
add_custom_target (fixbundle ALL
|
|
||||||
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/fixbundle.win.cmake" )
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (APPLE)
|
if (WIN32)
|
||||||
add_custom_target (fixbundle ALL
|
if ( NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" AND BUILD_APPS )
|
||||||
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/fixbundle.cmake"
|
add_custom_target (fixbundle ALL
|
||||||
)
|
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/fixbundle.win.cmake" )
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
add_custom_target (fixbundle ALL
|
||||||
|
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/fixbundle.cmake"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
endif() # project OpenMesh
|
||||||
|
|
||||||
# ========================================================================
|
# ========================================================================
|
||||||
# Call the subdirectories with there projects
|
# Call the subdirectories with there projects
|
||||||
@@ -67,36 +72,40 @@ add_subdirectory (Doc)
|
|||||||
# Bundle generation (Targets exist, now configure them)
|
# Bundle generation (Targets exist, now configure them)
|
||||||
# ========================================================================
|
# ========================================================================
|
||||||
|
|
||||||
if (WIN32 AND BUILD_APPS )
|
# Only call fixbundle, when we are building OpenMesh standalone
|
||||||
# prepare bundle generation cmake file and add a build target for it
|
if(${PROJECT_NAME} MATCHES "OpenMesh")
|
||||||
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/cmake/fixbundle.cmake.win.in"
|
|
||||||
"${CMAKE_BINARY_DIR}/fixbundle.win.cmake" @ONLY IMMEDIATE)
|
if (WIN32 AND BUILD_APPS )
|
||||||
|
# prepare bundle generation cmake file and add a build target for it
|
||||||
|
configure_file ("${CMAKE_SOURCE_DIR}/cmake/fixbundle.cmake.win.in"
|
||||||
|
"${CMAKE_BINARY_DIR}/fixbundle.win.cmake" @ONLY IMMEDIATE)
|
||||||
|
|
||||||
|
if ( NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" )
|
||||||
|
# let bundle generation depend on all targets
|
||||||
|
add_dependencies (fixbundle QtViewer DecimaterGui)
|
||||||
|
endif()
|
||||||
|
|
||||||
if ( NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" )
|
|
||||||
# let bundle generation depend on all targets
|
|
||||||
add_dependencies (fixbundle QtViewer DecimaterGui)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
# prepare bundle generation cmake file and add a build target for it
|
||||||
|
configure_file ("${CMAKE_SOURCE_DIR}/cmake/fixbundle.cmake.in"
|
||||||
|
"${CMAKE_BINARY_DIR}/fixbundle.cmake" @ONLY IMMEDIATE)
|
||||||
|
|
||||||
if (APPLE)
|
# let bundle generation depend on all targets
|
||||||
# prepare bundle generation cmake file and add a build target for it
|
add_dependencies (fixbundle DecimaterGui ProgViewer QtViewer SubdividerGui)
|
||||||
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/cmake/fixbundle.cmake.in"
|
|
||||||
"${CMAKE_BINARY_DIR}/fixbundle.cmake" @ONLY IMMEDIATE)
|
|
||||||
|
|
||||||
# let bundle generation depend on all targets
|
# Required for Snow leopard, and the latest qt. Then the resources have to be copied
|
||||||
add_dependencies (fixbundle DecimaterGui ProgViewer QtViewer SubdividerGui)
|
if ( EXISTS "/opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/Resources/qt_menu.nib" )
|
||||||
|
add_custom_command(TARGET OpenMesh POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_directory "/opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/Resources/qt_menu.nib" "${CMAKE_BINARY_DIR}/Build/Libraries/qt_menu.nib"
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
# Required for Snow leopard, and the latest qt. Then the resources have to be copied
|
|
||||||
if ( EXISTS "/opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/Resources/qt_menu.nib" )
|
|
||||||
add_custom_command(TARGET OpenMesh POST_BUILD
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory "/opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/Resources/qt_menu.nib" "${CMAKE_BINARY_DIR}/Build/Libraries/qt_menu.nib"
|
|
||||||
)
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
# ========================================================================
|
# ========================================================================
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user