Implement disabling of automatic library installation

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@369 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2011-01-28 10:28:43 +00:00
parent 6c58af39e2
commit fb496b73d3
3 changed files with 32 additions and 15 deletions

View File

@@ -145,6 +145,7 @@ macro (acg_qt4)
set (QT_USE_QTSCRIPT 1) set (QT_USE_QTSCRIPT 1)
set (QT_USE_QTSQL 1) set (QT_USE_QTSQL 1)
set (QT_USE_QTXML 1) set (QT_USE_QTXML 1)
set (QT_USE_QTXMLPATTERNS 1)
set (QT_USE_QTHELP 1) set (QT_USE_QTHELP 1)
set (QT_USE_QTWEBKIT 1) set (QT_USE_QTWEBKIT 1)
set (QT_USE_QTUITOOLS 1) set (QT_USE_QTUITOOLS 1)
@@ -498,6 +499,9 @@ function (acg_add_library _target _libtype)
endif () endif ()
# Block installation of libraries by setting ACG_NO_LIBRARY_INSTALL
if ( NOT ACG_NO_LIBRARY_INSTALL )
if (NOT ACG_PROJECT_MACOS_BUNDLE OR NOT APPLE) if (NOT ACG_PROJECT_MACOS_BUNDLE OR NOT APPLE)
if (${_type} STREQUAL SHARED OR ${_type} STREQUAL STATIC ) if (${_type} STREQUAL SHARED OR ${_type} STREQUAL STATIC )
install (TARGETS ${_target} install (TARGETS ${_target}
@@ -514,6 +518,7 @@ function (acg_add_library _target _libtype)
install (TARGETS ${_target} DESTINATION ${ACG_PROJECT_PLUGINDIR}) install (TARGETS ${_target} DESTINATION ${ACG_PROJECT_PLUGINDIR})
endif () endif ()
endif () endif ()
endif()
endfunction () endfunction ()

View File

@@ -24,6 +24,12 @@ set (directories
acg_append_files (headers "*.hh" ${directories}) acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories}) acg_append_files (sources "*.cc" ${directories})
# Disable Library installation when not building OpenMesh on its own but as part of another project!
if ( NOT ${PROJECT_NAME} MATCHES "OpenMesh")
set(ACG_NO_LIBRARY_INSTALL true)
endif()
if (WIN32) if (WIN32)
# OpenMesh has no dll exports so we have to build a static library on windows # OpenMesh has no dll exports so we have to build a static library on windows
acg_add_library (OpenMeshCore STATIC ${sources} ${headers}) acg_add_library (OpenMeshCore STATIC ${sources} ${headers})

View File

@@ -26,6 +26,12 @@ IF(WIN32)
acg_append_files (sources "*.c" ${directories}) acg_append_files (sources "*.c" ${directories})
ENDIF(WIN32) ENDIF(WIN32)
# Disable Library installation when not building OpenMesh on its own but as part of another project!
if ( NOT ${PROJECT_NAME} MATCHES "OpenMesh")
set(ACG_NO_LIBRARY_INSTALL true)
endif()
if (WIN32) if (WIN32)
# OpenMesh has no dll exports so we have to build a static library on windows # OpenMesh has no dll exports so we have to build a static library on windows
acg_add_library (OpenMeshTools STATIC ${sources} ${headers}) acg_add_library (OpenMeshTools STATIC ${sources} ${headers})