From ced860e96e5d2e10481582649664505396b0054d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leonardo=20Fl=C3=B3rez-Valencia?= Date: Fri, 11 Nov 2016 15:19:09 -0500 Subject: [PATCH] ... --- CMakeLists.txt | 3 +- appli/bash/Config.h.in | 1 + appli/bash/CreateInstances.cxx | 14 +-- cmake/Functions.cmake | 105 +++++++----------- cmake/cpPluginsConfig.cmake.in | 27 ----- lib/CMakeLists.txt | 54 ++++++++- lib/Instances/BaseObjects.i | 2 +- lib/Instances/CMakeLists.txt | 6 +- .../cpPluginsExtensions}/Extensions.i | 0 .../PolyLineParametricPath.cxx | 2 +- .../PolyLineParametricPath.d | 0 .../PolyLineParametricPath.h | 2 +- .../cpPluginsExtensions}/Simple3DCurve.cxx | 2 +- .../cpPluginsExtensions}/Simple3DCurve.d | 0 .../cpPluginsExtensions}/Simple3DCurve.h | 2 +- .../cpPluginsExtensions}/Skeleton.cxx | 2 +- .../cpPluginsExtensions}/Skeleton.d | 0 .../cpPluginsExtensions}/Skeleton.h | 2 +- plugins/CMakeLists.txt | 51 +++++---- .../PolyLineParametricPathToSimple3DCurve.cxx | 4 +- plugins/IO/ImageJSkeletonWriter.cxx | 2 +- plugins/ImageSliceFilters/CPRImageFilter.cxx | 2 +- 22 files changed, 140 insertions(+), 143 deletions(-) rename {plugins/Extensions => lib/cpPluginsExtensions}/Extensions.i (100%) rename {plugins/Extensions => lib/cpPluginsExtensions}/PolyLineParametricPath.cxx (96%) rename {plugins/Extensions => lib/cpPluginsExtensions}/PolyLineParametricPath.d (100%) rename {plugins/Extensions => lib/cpPluginsExtensions}/PolyLineParametricPath.h (96%) rename {plugins/Extensions => lib/cpPluginsExtensions}/Simple3DCurve.cxx (97%) rename {plugins/Extensions => lib/cpPluginsExtensions}/Simple3DCurve.d (100%) rename {plugins/Extensions => lib/cpPluginsExtensions}/Simple3DCurve.h (96%) rename {plugins/Extensions => lib/cpPluginsExtensions}/Skeleton.cxx (97%) rename {plugins/Extensions => lib/cpPluginsExtensions}/Skeleton.d (100%) rename {plugins/Extensions => lib/cpPluginsExtensions}/Skeleton.h (96%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7263959..2e161e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,6 @@ INCLUDE(cmake/Functions.cmake) ## == Build different parts == ## =========================== -#SUBDIRS(appli cmake lib plugins) -SUBDIRS(appli lib plugins) +SUBDIRS(appli cmake lib plugins) ## eof - $RCSfile$ diff --git a/appli/bash/Config.h.in b/appli/bash/Config.h.in index 8306fe5..09eb417 100644 --- a/appli/bash/Config.h.in +++ b/appli/bash/Config.h.in @@ -23,6 +23,7 @@ #define cpPlugins_CONFIG_DIFFUSIONTENSORS "@cpPlugins_CONFIG_DIFFUSIONTENSORS@" #define cpPlugins_CONFIG_MATRICES "@cpPlugins_CONFIG_MATRICES@" #define cpPlugins_ALL_CONFIGS "@cpPlugins_ALL_CONFIGS@" +#define cpPlugins_CONFIG_NUMBER_OF_FILES @cpPlugins_CONFIG_NUMBER_OF_FILES@ // ------------------------------------------------------------------------- #define cpPlugins_bash_OS_@CMAKE_SYSTEM_NAME@ diff --git a/appli/bash/CreateInstances.cxx b/appli/bash/CreateInstances.cxx index 6ffe2dc..95d41fa 100644 --- a/appli/bash/CreateInstances.cxx +++ b/appli/bash/CreateInstances.cxx @@ -4,19 +4,19 @@ int main( int argc, char* argv[] ) { // Get inputs - if( argc < 5 ) + if( argc < 4 ) { std::cerr << "Usage: " << argv[ 0 ] - << " definitons_file library_name output_path number_of_sources" + << " definitons_file library_name output_prefix" << std::endl; return( 1 ); } // fi std::string definitions_filename = argv[ 1 ]; std::string library_name = argv[ 2 ]; - std::string output_path = argv[ 3 ]; - unsigned int number_of_sources = std::atoi( argv[ 4 ] ); + std::string output_prefix = argv[ 3 ]; + unsigned int number_of_sources = cpPlugins_CONFIG_NUMBER_OF_FILES; // Read inputs std::string definitions_buffer; @@ -105,7 +105,7 @@ int main( int argc, char* argv[] ) // Write header std::stringstream header_filename; - header_filename << output_path << "/" << library_name << ".h"; + header_filename << output_prefix << ".h"; if( !( cpPlugins_bash::Write( header.str( ), header_filename.str( ) ) ) ) { std::cerr << "Error writing header file." << std::endl; @@ -151,7 +151,7 @@ int main( int argc, char* argv[] ) << "#include <" << library_name << "_Export.h>" << std::endl; source - << "#include <" << output_path<< "/" << library_name << ".h>" + << "#include <" << output_prefix << ".h>" << std::endl << std::endl; if( tfiles.size( ) > 0 ) { @@ -184,7 +184,7 @@ int main( int argc, char* argv[] ) source << std::endl << "// eof" << std::endl; std::stringstream source_file; source_file - << output_path << "/" << library_name << "_" << f_id << ".cxx"; + << output_prefix << "_" << f_id << ".cxx"; if( !( cpPlugins_bash::Write( source.str( ), source_file.str( ) ) ) ) { std::cerr << "Error writing source code." << std::endl; diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake index 9beaaae..aebf89f 100644 --- a/cmake/Functions.cmake +++ b/cmake/Functions.cmake @@ -60,6 +60,7 @@ ENDFUNCTION() ## ------------------------------------------------------------------------- FUNCTION( PrepareSourceFiles + out_lib_name out_sources_list out_headers_list out_headers_paths @@ -69,6 +70,7 @@ SET(_sources_extensions .c .cpp .cxx) SET(_headers_extensions .h .hpp .hxx) SET(_qt_ui_extensions .ui) SET(_demangler_extensions .d) +SET(_instances_extensions .i) ## -- Configure inputs SET(_all_files) @@ -98,12 +100,14 @@ SET(_srcs) SET(_hdrs) SET(_qts) SET(_demanglers) +SET(_instances) FOREACH(_file ${_all_files}) GET_FILENAME_COMPONENT(_ext ${_file} EXT) LIST(FIND _sources_extensions ${_ext} _src) LIST(FIND _headers_extensions ${_ext} _hdr) LIST(FIND _qt_ui_extensions ${_ext} _ui) LIST(FIND _demangler_extensions ${_ext} _dem) + LIST(FIND _instances_extensions ${_ext} _ins) IF(NOT ${_src} EQUAL -1) LIST(APPEND _srcs ${_file}) ENDIF(NOT ${_src} EQUAL -1) @@ -116,6 +120,9 @@ FOREACH(_file ${_all_files}) IF(NOT ${_dem} EQUAL -1) LIST(APPEND _demanglers ${_file}) ENDIF(NOT ${_dem} EQUAL -1) + IF(NOT ${_ins} EQUAL -1) + LIST(APPEND _instances ${_file}) + ENDIF(NOT ${_ins} EQUAL -1) ENDFOREACH(_file) # -- Prepare Qt4-based code @@ -156,6 +163,36 @@ FOREACH(_d ${_demanglers}) LIST(APPEND _hdrs ${_d_out}) ENDFOREACH(_d) +## -- Create instances +FOREACH(_i ${_instances}) + STRING( + REPLACE + ${PROJECT_SOURCE_DIR} + ${PROJECT_BINARY_DIR} + _i_bin + ${_i} + ) + GET_FILENAME_COMPONENT(_i_path ${_i_bin} DIRECTORY) + GET_FILENAME_COMPONENT(_out_name ${_i} NAME_WE) + + ## -- Infere source code filenames + MATH(EXPR _last_range "${cpPlugins_CONFIG_NUMBER_OF_FILES}-1") + SET(_out_code "${_i_path}/${_out_name}.h") + LIST(APPEND _hdrs ${_i_path}/${_out_name}.h) + FOREACH(_n RANGE 0 ${_last_range}) + LIST(APPEND _out_code ${_i_path}/${_out_name}_${_n}.cxx) + LIST(APPEND _srcs ${_i_path}/${_out_name}_${_n}.cxx) + ENDFOREACH(_n) + + ## -- Command to write source code + ADD_CUSTOM_COMMAND( + OUTPUT ${_out_code} + DEPENDS ${cpPlugins_bash_CreateInstances_APP} ${_i} + COMMAND ${CMAKE_COMMAND} -E make_directory ${_i_path} + COMMAND ${cpPlugins_bash_CreateInstances_APP} ${_i} ${out_lib_name} ${_i_path}/${_out_name} + ) +ENDFOREACH(_i) + ## -- Real compilation SET(_hdrs_paths) FOREACH(_hdr ${_hdrs}) @@ -178,7 +215,7 @@ FUNCTION( lib_name lib_type ) -PrepareSourceFiles(_srcs _hdrs _paths ${ARGN}) +PrepareSourceFiles(${lib_name} _srcs _hdrs _paths ${ARGN}) INCLUDE_DIRECTORIES( ${_paths} ${CMAKE_CURRENT_SOURCE_DIR} @@ -214,87 +251,23 @@ FILE(GLOB_RECURSE _files "${lib_dir}/*") CreateLib(${lib_name} ${lib_type} ${_files} ${ARGN}) ENDFUNCTION() -## ------------------------------------------------------------------------- -FUNCTION( - CompileInstances - out_lib_name - def_file - number_of_files - ) - -### -- Configure inputs to be cmake-path compatible -SET(_src_dir ${CMAKE_CURRENT_SOURCE_DIR}) -SET(_bin_dir ${CMAKE_CURRENT_BINARY_DIR}) -SET(_def_file "${_src_dir}/${def_file}") - -## -- Infere source code filenames -MATH(EXPR _last_range "${number_of_files}-1") -SET(_out_code "${_bin_dir}/${out_lib_name}.h") -FOREACH(_n RANGE 0 ${_last_range}) - LIST(APPEND _out_code ${_bin_dir}/${out_lib_name}_${_n}.cxx) -ENDFOREACH(_n) - -## -- Command to write source code -ADD_CUSTOM_COMMAND( - OUTPUT ${_out_code} - DEPENDS ${cpPlugins_bash_CreateInstances_APP} ${_def_file} - COMMAND ${cpPlugins_bash_CreateInstances_APP} ${_def_file} ${out_lib_name} ${_bin_dir} ${number_of_files} - ) - -## -- Create library -CreateLib(${out_lib_name} SHARED "${_out_code}") - -ENDFUNCTION() - ## ------------------------------------------------------------------------- FUNCTION( CreatePlugin lib_name lib_dir - number_of_files ) - GET_FILENAME_COMPONENT(_lib_dir ${lib_dir} REALPATH) FILE(GLOB_RECURSE _files "${_lib_dir}/*") SET(_hdr_to_wrap) -SET(_instances) FOREACH(_file ${_files}) FILE(READ ${_file} _txt) STRING(FIND "${_txt}" "cpPluginsObject" _res) IF(NOT ${_res} EQUAL -1) LIST(APPEND _hdr_to_wrap ${_file}) ENDIF(NOT ${_res} EQUAL -1) - GET_FILENAME_COMPONENT(_ext ${_file} EXT) - IF(${_ext} STREQUAL ".i") - LIST(APPEND _instances ${_file}) - ENDIF(${_ext} STREQUAL ".i") ENDFOREACH(_file) -IF(_instances) - FOREACH(_instance ${_instances}) - STRING( - REPLACE - ${PROJECT_SOURCE_DIR} - ${PROJECT_BINARY_DIR} - _out_dir - ${_lib_dir} - ) - MATH(EXPR _last_range "${number_of_files}-1") - SET(_out_code "${_out_dir}/${lib_name}.h") - FOREACH(_n RANGE 0 ${_last_range}) - LIST(APPEND _out_code ${_out_dir}/${lib_name}_${_n}.cxx) - ENDFOREACH(_n) - - ADD_CUSTOM_COMMAND( - OUTPUT ${_out_code} - DEPENDS ${cpPlugins_bash_CreateInstances_APP} ${_instance} - COMMAND ${CMAKE_COMMAND} -E make_directory ${_out_dir} - COMMAND ${cpPlugins_bash_CreateInstances_APP} ${_instance} ${lib_name} ${_out_dir} ${number_of_files} - ) - LIST(APPEND _files ${_out_code}) - ENDFOREACH(_instance) -ENDIF(_instances) - IF(_hdr_to_wrap) STRING( REPLACE @@ -326,7 +299,7 @@ FUNCTION( OPTION(BUILD_${app_name} "Build ${app_name}" OFF) IF(BUILD_${app_name}) FILE(GLOB_RECURSE _files "${app_dir}/*") - PrepareSourceFiles(_srcs _hdrs _paths ${_files} ${ARGN}) + PrepareSourceFiles(${app_name} _srcs _hdrs _paths ${_files} ${ARGN}) INCLUDE_DIRECTORIES( ${_paths} ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/cmake/cpPluginsConfig.cmake.in b/cmake/cpPluginsConfig.cmake.in index ab0456c..b6fad2d 100644 --- a/cmake/cpPluginsConfig.cmake.in +++ b/cmake/cpPluginsConfig.cmake.in @@ -51,33 +51,6 @@ ENDIF(_l_locations) ## == Find include directories == ## ============================== -#SET(cpPlugins_All_Headers "@cpPlugins_All_Headers@" CACHE STRING "Internal") -#MARK_AS_ADVANCED(FORCE cpPlugins_All_Headers) -#SET(_header_paths -# "@PROJECT_SOURCE_DIR@/lib" -# "@PROJECT_BINARY_DIR@/lib" -# "@PROJECT_SOURCE_DIR@/lib/Instances" -# "@PROJECT_BINARY_DIR@/lib/Instances" -# "@CMAKE_INSTALL_PREFIX@/include" -# ) -#FOREACH(_h ${cpPlugins_All_Headers}) -# GET_FILENAME_COMPONENT(_h_name ${_h} NAME) -# GET_FILENAME_COMPONENT(_h_dir ${_h} DIRECTORY) -# FIND_PATH( -# _loc_${_h_name} ${_h_name} -# HINTS -# ${_header_paths} -# ${_h_dir} -# ) -# IF(_loc_${_h_name}) -# LIST(APPEND _header_paths ${_loc_${_h_name}}) -# LIST(REMOVE_DUPLICATES _header_paths) -# ELSE(_loc_${_h_name}) -# MESSAGE(FATAL_ERROR "Please configure where is ${_h_name}") -# ENDIF(_loc_${_h_name}) -#ENDFOREACH(_h ${cpPlugins_All_Headers}) -#MESSAGE(STATUS ${_header_paths}) - ## TODO: this is not completely correct!!! INCLUDE_DIRECTORIES( @CMAKE_INSTALL_PREFIX@/include diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e222646..6d0c6f9 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -50,7 +50,59 @@ IF(USE_QT4) TARGET_LINK_LIBRARIES( cpBaseQtApplication cpPlugins cpExtensions - ) + ) ENDIF(USE_QT4) +CompileLibFromDir(cpPluginsExtensions SHARED cpPluginsExtensions) +TARGET_LINK_LIBRARIES(cpPluginsExtensions cpPlugins cpExtensions) + +## ==================== +## == Base libraries == +## ==================== + +IF(USE_QT4) + SET( + cpPlugins_BaseLibraries + cp_tinyxml2 + cp_QCustomPlot + cpExtensions + cpPlugins + CACHE INTERNAL "All locally compiled libraries." FORCE + ) +ELSE(USE_QT4) + SET( + cpPlugins_BaseLibraries + cp_tinyxml2 + cpExtensions + cpPlugins + CACHE INTERNAL "All locally compiled libraries." FORCE + ) +ENDIF(USE_QT4) + +## =================================== +## == Libraries to dynamically load == +## =================================== + +SET(_pre ${CMAKE_SHARED_LIBRARY_PREFIX}) +SET(_suf ${CMAKE_SHARED_LIBRARY_SUFFIX}) + +SET(cpPlugins_DynLibs "${CMAKE_INSTALL_PREFIX}/bin/${_pre}cpExtensions${_suf}") +LIST(APPEND cpPlugins_DynLibs "${CMAKE_INSTALL_PREFIX}/lib/${_pre}cpExtensions${_suf}") +LIST(APPEND cpPlugins_DynLibs "${LIBRARY_OUTPUT_PATH}/${_pre}cpExtensions${_suf}") +FOREACH(_lib ${cpPlugins_Instances}) + LIST(APPEND cpPlugins_DynLibs "${CMAKE_INSTALL_PREFIX}/bin/${_pre}${_lib}${_suf}") + LIST(APPEND cpPlugins_DynLibs "${CMAKE_INSTALL_PREFIX}/lib/${_pre}${_lib}${_suf}") + LIST(APPEND cpPlugins_DynLibs "${LIBRARY_OUTPUT_PATH}/${_pre}${_lib}${_suf}") +ENDFOREACH(_lib) +LIST(APPEND cpPlugins_DynLibs "${VTK_INSTALL_PREFIX}/bin/*vtk*${_suf}") +LIST(APPEND cpPlugins_DynLibs "${VTK_INSTALL_PREFIX}/lib/*vtk*${_suf}") +LIST(APPEND cpPlugins_DynLibs "${ITK_INSTALL_PREFIX}/bin/*itk*${_suf}") +LIST(APPEND cpPlugins_DynLibs "${ITK_INSTALL_PREFIX}/lib/*itk*${_suf}") +LIST(APPEND cpPlugins_DynLibs "${ITK_INSTALL_PREFIX}/bin/*ITK*${_suf}") +LIST(APPEND cpPlugins_DynLibs "${ITK_INSTALL_PREFIX}/lib/*ITK*${_suf}") +FILE(WRITE ${PROJECT_BINARY_DIR}/cpPlugins_Libraries.config "") +FOREACH(_lib ${cpPlugins_DynLibs}) + FILE(APPEND ${PROJECT_BINARY_DIR}/cpPlugins_Libraries.config "${_lib}\n") +ENDFOREACH(_lib) + ## eof - $RCSfile$ diff --git a/lib/Instances/BaseObjects.i b/lib/Instances/BaseObjects.i index 89533e7..1d3d5b7 100644 --- a/lib/Instances/BaseObjects.i +++ b/lib/Instances/BaseObjects.i @@ -1,7 +1,7 @@ header #define ITK_MANUAL_INSTANTIATION define arrays=Array2D;Array;#color_pixels# -define fixed_dims=#visual_dims#;4;6;8 +define fixed_dims=#visual_dims#;1;4;6;8 tinclude itk#arrays#:h|hxx tinclude itkFixedArray:h|hxx diff --git a/lib/Instances/CMakeLists.txt b/lib/Instances/CMakeLists.txt index c418df6..71b87a7 100644 --- a/lib/Instances/CMakeLists.txt +++ b/lib/Instances/CMakeLists.txt @@ -17,11 +17,7 @@ SET( SET(_all_libs) FOREACH(_def ${_all_defs}) SET(_name ${_p}${_def}) - CompileInstances( - ${_name} - ${_def}.i - ${cpPlugins_CONFIG_NUMBER_OF_FILES} - ) + CreateLib(${_name} SHARED ${CMAKE_CURRENT_SOURCE_DIR}/${_def}.i) LIST(APPEND _all_libs ${_name}) ENDFOREACH(_def) SET( diff --git a/plugins/Extensions/Extensions.i b/lib/cpPluginsExtensions/Extensions.i similarity index 100% rename from plugins/Extensions/Extensions.i rename to lib/cpPluginsExtensions/Extensions.i diff --git a/plugins/Extensions/PolyLineParametricPath.cxx b/lib/cpPluginsExtensions/PolyLineParametricPath.cxx similarity index 96% rename from plugins/Extensions/PolyLineParametricPath.cxx rename to lib/cpPluginsExtensions/PolyLineParametricPath.cxx index cb4a6be..ee12798 100644 --- a/plugins/Extensions/PolyLineParametricPath.cxx +++ b/lib/cpPluginsExtensions/PolyLineParametricPath.cxx @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/plugins/Extensions/PolyLineParametricPath.d b/lib/cpPluginsExtensions/PolyLineParametricPath.d similarity index 100% rename from plugins/Extensions/PolyLineParametricPath.d rename to lib/cpPluginsExtensions/PolyLineParametricPath.d diff --git a/plugins/Extensions/PolyLineParametricPath.h b/lib/cpPluginsExtensions/PolyLineParametricPath.h similarity index 96% rename from plugins/Extensions/PolyLineParametricPath.h rename to lib/cpPluginsExtensions/PolyLineParametricPath.h index 566a4be..d2c84fe 100644 --- a/plugins/Extensions/PolyLineParametricPath.h +++ b/lib/cpPluginsExtensions/PolyLineParametricPath.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include // ------------------------------------------------------------------------- diff --git a/plugins/Extensions/Simple3DCurve.cxx b/lib/cpPluginsExtensions/Simple3DCurve.cxx similarity index 97% rename from plugins/Extensions/Simple3DCurve.cxx rename to lib/cpPluginsExtensions/Simple3DCurve.cxx index 25aa5a1..86db732 100644 --- a/plugins/Extensions/Simple3DCurve.cxx +++ b/lib/cpPluginsExtensions/Simple3DCurve.cxx @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/plugins/Extensions/Simple3DCurve.d b/lib/cpPluginsExtensions/Simple3DCurve.d similarity index 100% rename from plugins/Extensions/Simple3DCurve.d rename to lib/cpPluginsExtensions/Simple3DCurve.d diff --git a/plugins/Extensions/Simple3DCurve.h b/lib/cpPluginsExtensions/Simple3DCurve.h similarity index 96% rename from plugins/Extensions/Simple3DCurve.h rename to lib/cpPluginsExtensions/Simple3DCurve.h index cb68176..2c18f67 100644 --- a/plugins/Extensions/Simple3DCurve.h +++ b/lib/cpPluginsExtensions/Simple3DCurve.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include // ------------------------------------------------------------------------- class vtkPolyDataAlgorithm; diff --git a/plugins/Extensions/Skeleton.cxx b/lib/cpPluginsExtensions/Skeleton.cxx similarity index 97% rename from plugins/Extensions/Skeleton.cxx rename to lib/cpPluginsExtensions/Skeleton.cxx index 9e17f62..a7981ca 100644 --- a/plugins/Extensions/Skeleton.cxx +++ b/lib/cpPluginsExtensions/Skeleton.cxx @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/plugins/Extensions/Skeleton.d b/lib/cpPluginsExtensions/Skeleton.d similarity index 100% rename from plugins/Extensions/Skeleton.d rename to lib/cpPluginsExtensions/Skeleton.d diff --git a/plugins/Extensions/Skeleton.h b/lib/cpPluginsExtensions/Skeleton.h similarity index 96% rename from plugins/Extensions/Skeleton.h rename to lib/cpPluginsExtensions/Skeleton.h index 839da17..0be2901 100644 --- a/plugins/Extensions/Skeleton.h +++ b/lib/cpPluginsExtensions/Skeleton.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include // ------------------------------------------------------------------------- diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 99f07e0..7ca8687 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -4,7 +4,6 @@ SET( _dirlist - Extensions AnisotropicDiffusion GenericFilters ImageArithmeticFilters @@ -22,9 +21,9 @@ SET( Widgets ) -#IF(ParabolicMorphology_LOADED) -# LIST(APPEND _dirlist ImageParaMorphologyFilters) -#ENDIF(ParabolicMorphology_LOADED) +IF(ParabolicMorphology_LOADED) + LIST(APPEND _dirlist ImageParaMorphologyFilters) +ENDIF(ParabolicMorphology_LOADED) ## =============================== ## == Build each plugin library == @@ -37,7 +36,7 @@ INCLUDE_DIRECTORIES( ${PROJECT_BINARY_DIR}/lib/Instances ) FOREACH(_dir ${_dirlist}) - CreatePlugin(cpPlugins${_dir} ${_dir} ${cpPlugins_CONFIG_NUMBER_OF_FILES}) + CreatePlugin(cpPlugins${_dir} ${_dir}) TARGET_LINK_LIBRARIES( cpPlugins${_dir} cpPlugins cpExtensions @@ -49,24 +48,28 @@ TARGET_LINK_LIBRARIES( cpPluginsIO cpPluginsExtensions ) - -#TARGET_LINK_LIBRARIES( -# cpPluginsImageDistanceMaps -# cpPluginsImageThresholdFilters -# ) -#TARGET_LINK_LIBRARIES( -# cpPluginsImageSliceFilters -# cpPluginsImageGenericFilters -# ) -#TARGET_LINK_LIBRARIES( -# cpPluginsImageGradientFilters -# cpPluginsImageGenericFilters -# ) -#IF(ParabolicMorphology_LOADED) -# TARGET_LINK_LIBRARIES( -# cpPluginsImageParaMorphologyFilters -# cpPluginsImageThresholdFilters -# ) -#ENDIF(ParabolicMorphology_LOADED) +TARGET_LINK_LIBRARIES( + cpPluginsImageDistanceMaps + cpPluginsImageThresholdFilters + ) +TARGET_LINK_LIBRARIES( + cpPluginsGenericFilters + cpPluginsExtensions + ) +TARGET_LINK_LIBRARIES( + cpPluginsImageSliceFilters + cpPluginsImageGenericFilters + cpPluginsExtensions + ) +TARGET_LINK_LIBRARIES( + cpPluginsImageGradientFilters + cpPluginsImageGenericFilters + ) +IF(ParabolicMorphology_LOADED) + TARGET_LINK_LIBRARIES( + cpPluginsImageParaMorphologyFilters + cpPluginsImageThresholdFilters + ) +ENDIF(ParabolicMorphology_LOADED) ## eof - $RSCfile$ diff --git a/plugins/GenericFilters/PolyLineParametricPathToSimple3DCurve.cxx b/plugins/GenericFilters/PolyLineParametricPathToSimple3DCurve.cxx index af6facf..77a9ea1 100644 --- a/plugins/GenericFilters/PolyLineParametricPathToSimple3DCurve.cxx +++ b/plugins/GenericFilters/PolyLineParametricPathToSimple3DCurve.cxx @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include #include #include diff --git a/plugins/IO/ImageJSkeletonWriter.cxx b/plugins/IO/ImageJSkeletonWriter.cxx index 7d230db..482000f 100644 --- a/plugins/IO/ImageJSkeletonWriter.cxx +++ b/plugins/IO/ImageJSkeletonWriter.cxx @@ -1,7 +1,7 @@ #include #include -#include +#include #include #include diff --git a/plugins/ImageSliceFilters/CPRImageFilter.cxx b/plugins/ImageSliceFilters/CPRImageFilter.cxx index 77c7f81..600dec9 100644 --- a/plugins/ImageSliceFilters/CPRImageFilter.cxx +++ b/plugins/ImageSliceFilters/CPRImageFilter.cxx @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include -- 2.47.1