Disable apps completly if not standalone
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@510 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -6,64 +6,58 @@ endif()
|
|||||||
|
|
||||||
if ( BUILD_APPS )
|
if ( BUILD_APPS )
|
||||||
|
|
||||||
# Only call fixbundle, when we are building OpenMesh standalone
|
# Only build and fixbundle apps, when we are building OpenMesh standalone
|
||||||
if(${PROJECT_NAME} MATCHES "OpenMesh")
|
if(${PROJECT_NAME} MATCHES "OpenMesh")
|
||||||
|
|
||||||
|
add_subdirectory (Dualizer)
|
||||||
|
add_subdirectory (Decimating/commandlineDecimater)
|
||||||
|
add_subdirectory (Smoothing)
|
||||||
|
add_subdirectory (Subdivider/commandlineSubdivider)
|
||||||
|
add_subdirectory (Subdivider/commandlineAdaptiveSubdivider)
|
||||||
|
add_subdirectory (mconvert)
|
||||||
|
add_subdirectory (VDProgMesh/mkbalancedpm)
|
||||||
|
add_subdirectory (VDProgMesh/Analyzer)
|
||||||
|
|
||||||
add_subdirectory (Dualizer)
|
# Add non ui apps as dependency before fixbundle
|
||||||
add_subdirectory (Decimating/commandlineDecimater)
|
if ( WIN32 )
|
||||||
add_subdirectory (Smoothing)
|
if ( NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" )
|
||||||
add_subdirectory (Subdivider/commandlineSubdivider)
|
# let bundle generation depend on all targets
|
||||||
add_subdirectory (Subdivider/commandlineAdaptiveSubdivider)
|
add_dependencies (fixbundle commandlineDecimater Dualizer mconvert Smoothing commandlineAdaptiveSubdivider commandlineSubdivider mkbalancedpm Analyzer )
|
||||||
add_subdirectory (mconvert)
|
endif()
|
||||||
add_subdirectory (VDProgMesh/mkbalancedpm)
|
endif()
|
||||||
add_subdirectory (VDProgMesh/Analyzer)
|
|
||||||
|
|
||||||
|
# Add non ui apps as dependency before fixbundle
|
||||||
|
if ( APPLE)
|
||||||
|
|
||||||
# Add non ui apps as dependency before fixbundle
|
|
||||||
if ( WIN32 )
|
|
||||||
if ( NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" )
|
|
||||||
# let bundle generation depend on all targets
|
# let bundle generation depend on all targets
|
||||||
add_dependencies (fixbundle commandlineDecimater Dualizer mconvert Smoothing commandlineAdaptiveSubdivider commandlineSubdivider mkbalancedpm Analyzer )
|
add_dependencies (fixbundle commandlineDecimater Dualizer mconvert Smoothing commandlineAdaptiveSubdivider commandlineSubdivider mkbalancedpm Analyzer )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# find needed packages for gui applications
|
||||||
|
find_package (OpenGL)
|
||||||
|
find_package (GLUT)
|
||||||
|
|
||||||
|
# For the apps, we need qt and opengl to build them
|
||||||
|
if (NOT QT4_FOUND)
|
||||||
|
find_package (Qt4 COMPONENTS QtCore QtGui )
|
||||||
|
|
||||||
|
set (QT_USE_QTOPENGL 1)
|
||||||
|
|
||||||
|
include (${QT_USE_FILE})
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if ("${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles")
|
||||||
|
message(WARNING "GUI Apps are not build with mingw. (TODO)")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Add non ui apps as dependency before fixbundle
|
# check for OpenGL and GLUT as our required dependencies
|
||||||
if ( APPLE)
|
if (QT4_FOUND AND OPENGL_FOUND AND GLUT_FOUND AND NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" )
|
||||||
# let bundle generation depend on all targets
|
add_subdirectory (Decimating/DecimaterGui)
|
||||||
add_dependencies (fixbundle commandlineDecimater Dualizer mconvert Smoothing commandlineAdaptiveSubdivider commandlineSubdivider mkbalancedpm Analyzer )
|
add_subdirectory (QtViewer)
|
||||||
endif()
|
add_subdirectory (Subdivider/SubdividerGui)
|
||||||
|
add_subdirectory (ProgViewer)
|
||||||
|
add_subdirectory (VDProgMesh/Synthesizer)
|
||||||
# find needed packages for gui applications
|
|
||||||
find_package (OpenGL)
|
|
||||||
find_package (GLUT)
|
|
||||||
|
|
||||||
# For the apps, we need qt and opengl to build them
|
|
||||||
if (NOT QT4_FOUND)
|
|
||||||
find_package (Qt4 COMPONENTS QtCore QtGui )
|
|
||||||
|
|
||||||
set (QT_USE_QTOPENGL 1)
|
|
||||||
|
|
||||||
include (${QT_USE_FILE})
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if ("${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles")
|
|
||||||
message(WARNING "GUI Apps are not build with mingw. (TODO)")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# check for OpenGL and GLUT as our required dependencies
|
|
||||||
if (QT4_FOUND AND OPENGL_FOUND AND GLUT_FOUND AND NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" )
|
|
||||||
add_subdirectory (Decimating/DecimaterGui)
|
|
||||||
add_subdirectory (QtViewer)
|
|
||||||
add_subdirectory (Subdivider/SubdividerGui)
|
|
||||||
add_subdirectory (ProgViewer)
|
|
||||||
add_subdirectory (VDProgMesh/Synthesizer)
|
|
||||||
|
|
||||||
# Make sure that we install all dlls into install directory on windows
|
|
||||||
if ( ${PROJECT_NAME} MATCHES "OpenMesh")
|
|
||||||
|
|
||||||
# Add ui apps as dependency before fixbundle
|
# Add ui apps as dependency before fixbundle
|
||||||
if ( WIN32 AND NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles")
|
if ( WIN32 AND NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles")
|
||||||
@@ -81,28 +75,27 @@ if (QT4_FOUND AND OPENGL_FOUND AND GLUT_FOUND AND NOT "${CMAKE_GENERATOR}" MATCH
|
|||||||
FILE(GLOB files_install_app_dlls "${CMAKE_BINARY_DIR}/Build/*.dll" )
|
FILE(GLOB files_install_app_dlls "${CMAKE_BINARY_DIR}/Build/*.dll" )
|
||||||
INSTALL(FILES ${files_install_app_dlls} DESTINATION . )
|
INSTALL(FILES ${files_install_app_dlls} DESTINATION . )
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
else ()
|
else ()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (NOT QT4_FOUND)
|
if (NOT QT4_FOUND)
|
||||||
message ("QT 4 not found! Skipping some apps.")
|
message ("QT 4 not found! Skipping some apps.")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (NOT OPENGL_FOUND)
|
||||||
|
message ("OpengGL not found! Skipping some apps.")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (NOT GLUT_FOUND)
|
||||||
|
message ("GLUT not found! Skipping some apps.")
|
||||||
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT OPENGL_FOUND)
|
endif() # Project is OpenMesh standalone
|
||||||
message ("OpengGL not found! Skipping some apps.")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (NOT GLUT_FOUND)
|
|
||||||
message ("GLUT not found! Skipping some apps.")
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
endif() # Project is OpenMesh standalone
|
|
||||||
|
|
||||||
else (BUILD_APPS)
|
else (BUILD_APPS)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user