From bcdb326c6b703fda6e63045cf47eaaf108741a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Tue, 23 Jun 2009 07:12:50 +0000 Subject: [PATCH] Added install target for static versions git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@170 fdac6126-5c0c-442c-9429-916003d36597 --- cmake/ACGCommon.cmake | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/cmake/ACGCommon.cmake b/cmake/ACGCommon.cmake index b76b6b53..8b09ae78 100644 --- a/cmake/ACGCommon.cmake +++ b/cmake/ACGCommon.cmake @@ -341,7 +341,13 @@ function (acg_add_library _target _libtype) set (_and_static 0) endif () - add_library (${_target} ${_type} ${ARGN}) + add_library (${_target} ${_type} ${ARGN} ) + +# acg_get_version() +# +# set_target_properties (${_target} PROPERTIES VERSION ${VERSION-MAJOR}.${VERSION-MINOR} +# SOVERSION ${VERSION-MAJOR}.${VERSION-MINOR} ) +# # set common target properties defined in common.cmake acg_set_target_props (${_target}) @@ -353,8 +359,17 @@ function (acg_add_library _target _libtype) acg_set_target_props (${_target}Static) if (NOT APPLE) +# todo : create correct so names set_target_properties (${_target}Static PROPERTIES - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" + ) + +# todo : rename the lib to omit the static name extension + install (TARGETS ${_target}Static + RUNTIME DESTINATION ${ACG_PROJECT_BINDIR} + LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR} + ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR} ) + endif () endif () @@ -426,7 +441,7 @@ function (acg_add_library _target _libtype) endif () 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} RUNTIME DESTINATION ${ACG_PROJECT_BINDIR} LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR}