Commit fb496b73 authored by Jan Möbius's avatar Jan Möbius

Implement disabling of automatic library installation

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@369 fdac6126-5c0c-442c-9429-916003d36597
parent 6c58af39
......@@ -145,6 +145,7 @@ macro (acg_qt4)
set (QT_USE_QTSCRIPT 1)
set (QT_USE_QTSQL 1)
set (QT_USE_QTXML 1)
set (QT_USE_QTXMLPATTERNS 1)
set (QT_USE_QTHELP 1)
set (QT_USE_QTWEBKIT 1)
set (QT_USE_QTUITOOLS 1)
......@@ -497,23 +498,27 @@ function (acg_add_library _target _libtype)
${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/lib${_target}.a)
endif ()
if (NOT ACG_PROJECT_MACOS_BUNDLE OR NOT APPLE)
if (${_type} STREQUAL SHARED OR ${_type} STREQUAL STATIC )
install (TARGETS ${_target}
RUNTIME DESTINATION ${ACG_PROJECT_BINDIR}
LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR}
ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR})
if (_and_static)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${_target}Static.a
DESTINATION ${ACG_PROJECT_LIBDIR}
RENAME lib${_target}.a
PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
# 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 (${_type} STREQUAL SHARED OR ${_type} STREQUAL STATIC )
install (TARGETS ${_target}
RUNTIME DESTINATION ${ACG_PROJECT_BINDIR}
LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR}
ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR})
if (_and_static)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${_target}Static.a
DESTINATION ${ACG_PROJECT_LIBDIR}
RENAME lib${_target}.a
PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif ()
elseif (${_type} STREQUAL MODULE)
install (TARGETS ${_target} DESTINATION ${ACG_PROJECT_PLUGINDIR})
endif ()
elseif (${_type} STREQUAL MODULE)
install (TARGETS ${_target} DESTINATION ${ACG_PROJECT_PLUGINDIR})
endif ()
endif ()
endif()
endfunction ()
......
......@@ -24,6 +24,12 @@ set (directories
acg_append_files (headers "*.hh" ${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)
# OpenMesh has no dll exports so we have to build a static library on windows
acg_add_library (OpenMeshCore STATIC ${sources} ${headers})
......
......@@ -26,6 +26,12 @@ IF(WIN32)
acg_append_files (sources "*.c" ${directories})
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)
# OpenMesh has no dll exports so we have to build a static library on windows
acg_add_library (OpenMeshTools STATIC ${sources} ${headers})
......
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