From: Leonardo Flórez-Valencia Date: Mon, 22 May 2017 01:08:21 +0000 (-0500) Subject: ... X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=c20c6faa2cc7d478c62e976d2e6e71a4371122f6;p=FrontAlgorithms.git ... --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b2a6a18..d13261f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,13 +70,13 @@ install( FILES "${project_config}" "${version_config}" - "${CMAKE_CURRENT_SOURCE_DIR}/cmake/fpaBaseConfig.cmake" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/${PROJECT_NAME}BaseConfig.cmake" + DESTINATION "${config_install_dir}" + ) +install( + EXPORT "${targets_export_name}" + NAMESPACE "${namespace}" DESTINATION "${config_install_dir}" ) -#install( -# EXPORT "${targets_export_name}" -# NAMESPACE "${namespace}" -# DESTINATION "${config_install_dir}" -# ) ## eof - $RCSfile$ diff --git a/cmake/fpaConfig.cmake.in b/cmake/fpaConfig.cmake.in index 635eea3..26692f3 100644 --- a/cmake/fpaConfig.cmake.in +++ b/cmake/fpaConfig.cmake.in @@ -1,7 +1,7 @@ @PACKAGE_INIT@ include("${CMAKE_CURRENT_LIST_DIR}/fpaBaseConfig.cmake") -## include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") check_required_components("@PROJECT_NAME@") ## ============== diff --git a/lib/fpa/Base/Version.cxx b/lib/fpa/Base/Version.cxx new file mode 100644 index 0000000..8f7f772 --- /dev/null +++ b/lib/fpa/Base/Version.cxx @@ -0,0 +1,13 @@ +// ========================================================================= +// @author Leonardo Florez Valencia +// @email florez-l@javeriana.edu.co +// ========================================================================= + +#include + +std::string fpa::Base::Version( ) +{ + return( "fpa_dummy" ); +} + +// eof - $RCSfile$ diff --git a/lib/fpa/Base/Version.h b/lib/fpa/Base/Version.h new file mode 100644 index 0000000..d7047a0 --- /dev/null +++ b/lib/fpa/Base/Version.h @@ -0,0 +1,24 @@ +// ========================================================================= +// @author Leonardo Florez Valencia +// @email florez-l@javeriana.edu.co +// ========================================================================= + +#ifndef __fpa__Base__Version__h__ +#define __fpa__Base__Version__h__ + +#include +#include + +namespace fpa +{ + namespace Base + { + std::string FPA_EXPORT Version( ); + + } // ecapseman + +} // ecapseman + +#endif // __fpa__Base__Version__h__ + +// eof - $RCSfile$ diff --git a/lib/fpa/CMakeLists.txt b/lib/fpa/CMakeLists.txt index a3ef666..88c4123 100644 --- a/lib/fpa/CMakeLists.txt +++ b/lib/fpa/CMakeLists.txt @@ -10,34 +10,38 @@ file(GLOB_RECURSE _image_src "${CMAKE_CURRENT_SOURCE_DIR}/Image/*.cxx") file(GLOB_RECURSE _image_hdr "${CMAKE_CURRENT_SOURCE_DIR}/Image/*.h") file(GLOB_RECURSE _image_hrc "${CMAKE_CURRENT_SOURCE_DIR}/Image/*.hxx") +set(_src ${_base_src} ${_image_src}) +set(_hdr ${_base_hdr} ${_image_hdr}) +set(_hrc ${_base_hrc} ${_image_hrc}) + ## ===================== ## == Compile library == ## ===================== -#add_library(fpa SHARED ${_src} ${_hdr} ${_hrc}) -#generate_export_header(fpa) -#set_property(TARGET fpa PROPERTY VERSION ${prj_VERSION}) -#set_property(TARGET fpa PROPERTY SOVERSION ${prj_SHORT_VERSION}) -#set_property( -# TARGET fpa PROPERTY INTERFACE_fpa_MAJOR_VERSION ${prj_MAJ_VERSION} -# ) -#set_property( -# TARGET fpa APPEND PROPERTY COMPATIBLE_INTERFACE_STRING ${prj_MAJ_VERSION} -# ) -#target_link_libraries(fpa PUBLIC ${VTK_LIBRARIES} ${ITK_LIBRARIES}) +add_library(fpa SHARED ${_src} ${_hdr} ${_hrc}) +generate_export_header(fpa) +set_property(TARGET fpa PROPERTY VERSION ${prj_VERSION}) +set_property(TARGET fpa PROPERTY SOVERSION ${prj_SHORT_VERSION}) +set_property( + TARGET fpa PROPERTY INTERFACE_fpa_MAJOR_VERSION ${prj_MAJ_VERSION} + ) +set_property( + TARGET fpa APPEND PROPERTY COMPATIBLE_INTERFACE_STRING ${prj_MAJ_VERSION} + ) +target_link_libraries(fpa PUBLIC ${VTK_LIBRARIES} ${ITK_LIBRARIES}) ## ======================== ## == Installation rules == ## ======================== -#install( -# TARGETS fpa -# EXPORT "${targets_export_name}" -# LIBRARY DESTINATION "lib" -# ARCHIVE DESTINATION "lib" -# RUNTIME DESTINATION "bin" -# INCLUDES DESTINATION "${include_install_dir}" -# ) +install( + TARGETS fpa + EXPORT "${targets_export_name}" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + RUNTIME DESTINATION "bin" + INCLUDES DESTINATION "${include_install_dir}" + ) install( DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" DESTINATION "${include_install_dir}" @@ -48,9 +52,9 @@ install( DESTINATION "${include_install_dir}" FILES_MATCHING PATTERN "*.hxx" ) -#install( -# FILES "${CMAKE_CURRENT_BINARY_DIR}/fpa_export.h" -# DESTINATION "${include_install_dir}/fpa" -# ) +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/fpa_export.h" + DESTINATION "${include_install_dir}/fpa" + ) ## eof - $RCSfile$