Commit 029210d4 authored by Guillaume Pasero's avatar Guillaume Pasero

Merge branch 'change_cmake_namespace' into 'develop'

Fixes for NamespaceHandler

See merge request !584
parents 1d5da785 010bffb8
Pipeline #2540 passed with stages
in 3 minutes and 10 seconds
......@@ -53,6 +53,7 @@ function(otb_set_namespace folder ns)
list(APPEND _files_to_process ${_other_targets})
file(GLOB _module_files "${folder}/Modules/*.cmake")
list(APPEND _files_to_process ${_module_files})
list(APPEND _files_to_process "${folder}/OTBStandaloneModuleMacros.cmake")
# patch each file
foreach(_file_path ${_files_to_process})
......@@ -87,6 +88,16 @@ function(otb_set_namespace folder ns)
string(REPLACE ")" " )" _filtered_line "${_filtered_line}")
ns_filter_line()
string(REPLACE " )" ")" _filtered_line "${_filtered_line}")
elseif(_filtered_line MATCHES "<TARGET_FILE:")
set(_t_prefix "TARGET_FILE:")
set(_t_suffix ">")
ns_filter_line()
elseif(_filtered_line MATCHES "add_dependencies")
set(_t_prefix " ")
set(_t_suffix " ")
string(REPLACE ")" " )" _filtered_line "${_filtered_line}")
ns_filter_line()
string(REPLACE " )" ")" _filtered_line "${_filtered_line}")
endif()
list(APPEND _file_filtered_content ${_filtered_line})
endforeach()
......
......@@ -26,7 +26,7 @@ macro(otb_create_application)
# Build the library as a MODULE (shared lib even if OTB is built statically)
include_directories(${APPLICATION_INCLUDE_DIRS})
add_library(${APPLICATION_TARGET_NAME} MODULE ${APPLICATION_SOURCES})
target_link_libraries(${APPLICATION_TARGET_NAME} OTBApplicationEngine ${APPLICATION_LINK_LIBRARIES})
target_link_libraries(${APPLICATION_TARGET_NAME} ${APPLICATION_LINK_LIBRARIES})
if(otb-module)
otb_module_target_label(${APPLICATION_TARGET_NAME})
endif()
......
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