Commit 64182a41 authored by promayon's avatar promayon
Browse files

NEW camitk and qtpropertybrowser now have specific info (SONAME...), preparing...

NEW camitk and qtpropertybrowser now have specific info (SONAME...), preparing deb packaging thanks to M. Malaterre

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@167 ec899d31-69d1-42ba-9299-647d76f65fb3
parent e436b1c2
......@@ -16,6 +16,10 @@
# cmake -DCAMITK_INSTALL_ROOT=/usr -DCMAKE_BUILD_TYPE=Release -DACTION_ITKSEGMENTATION=TRUE -DACTION_ITKFILTERS=TRUE -DAPPLICATION_WIZARD=TRUE -DCOMPONENT_DICOM=TRUE -DCOMPONENT_ITKIMAGE=TRUE -DCOMPONENT_MML=TRUE -DCOMPONENT_PHYSICALMODEL=TRUE -DMML_GENERATE_XSD_LIB=TRUE /home/promayon/Dev/CamiTK/camitk
# make camitk_package
#
# To build source package
# make camitk_package_source
# (it generates the correct CamiTKVersion.h)
#
# Once CAMITK_INSTALL_ROOT is properly defined, type "make camitk_package"
#
# To check the content of a deb package:
......
......@@ -20,11 +20,20 @@ gather_headers_and_sources(${CAMITK_CORE_LIB})
# Needed for a correct CamiTK core plugin management (decl export/import) on WIN32
add_definitions(-DCOMPILE_CAMITK_API)
# prepare the library specific info (SONAME...)
set(CAMITKCORE_LIBRARY_PROPERTIES ${CAMITKCORE_LIBRARY_PROPERTIES}
VERSION "${CAMITK_VER_MAJ}.${CAMITK_VER_MIN}"
SOVERSION "${CAMITK_VER_MAJ}.${CAMITK_VER_MIN}.${CAMITK_VER_PAT}"
)
# CAMITK_CORE_LIB needs to be SHARED and loaded only ONCE otherwise the extensions
# can have their own copy of CAMITK_CORE_LIB, which will generates loads of problems
# because of the Singleton design pattern and various factory bits in CAMITK_CORE_LIB.
add_library(${CAMITK_CORE_LIB} SHARED ${${CAMITK_CORE_LIB}_SOURCES})
# set the library specific info (SONAME...)
set_target_properties(${CAMITK_CORE_LIB} PROPERTIES ${CAMITKCORE_LIBRARY_PROPERTIES} LINK_INTERFACE_LIBRARIES "")
target_link_libraries(${CAMITK_CORE_LIB} ${CAMITK_LIBRARIES})
add_dependencies(${CAMITK_CORE_LIB} qtpropertybrowser)
......@@ -49,6 +58,5 @@ install(TARGETS ${CAMITK_CORE_LIB}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/${CAMITK_SHORT_VERSION_STRING}
COMPONENT ${CAMITK_CORE_LIB}
COMPONENT ${CAMITK_CORE_LIB}
)
\ No newline at end of file
......@@ -137,10 +137,18 @@ if( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
add_definitions(-fPIC)
endif( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
# prepare the library specific info (SONAME...)
set(QTPROPERTYBROWSER_LIBRARY_PROPERTIES ${QTPROPERTYBROWSER_LIBRARY_PROPERTIES}
VERSION "${CAMITK_VER_MAJ}.${CAMITK_VER_MIN}"
SOVERSION "${CAMITK_VER_MAJ}.${CAMITK_VER_MIN}.${CAMITK_VER_PAT}"
)
add_library(qtpropertybrowser SHARED ${SRCS}) # better use static libs for distributing executables
target_link_libraries(qtpropertybrowser ${QT_LIBRARIES})
# set the library specific info (SONAME...)
set_target_properties(qtpropertybrowser PROPERTIES ${QTPROPERTYBROWSER_LIBRARY_PROPERTIES} LINK_INTERFACE_LIBRARIES "")
target_link_libraries(qtpropertybrowser ${QT_LIBRARIES})
# take all the headers for installation
file(GLOB HEADERS_H "src/*.h")
......@@ -154,7 +162,7 @@ export_headers(${HEADERS_H} ${HEADERS_UPPERCASE} COMPONENT qtpropertybrowser)
# lib installation
install(TARGETS qtpropertybrowser
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib/
ARCHIVE DESTINATION lib/
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/${CAMITK_SHORT_VERSION_STRING}
COMPONENT qtpropertybrowser
)
Supports Markdown
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