Skip to content
Snippets Groups Projects
Commit bf679dd1 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

fixed issue with compiler/linker flags being interpreted as lists and thus...

fixed issue with compiler/linker flags being interpreted as lists and thus having semicolons in between
parent d4ddd918
No related branches found
No related tags found
No related merge requests found
......@@ -15,12 +15,12 @@
# Since this file is already part of the installation to be found, the configuration can be hard-coded at
# installation time
set(@PROJECT_NAME@_VERSION @@PROJECT_NAME@_SOVERSION@)
set(@PROJECT_NAME@_VERSION "@@PROJECT_NAME@_SOVERSION@")
set(@PROJECT_NAME@_INCLUDE_DIRS @@PROJECT_NAME@_INCLUDE_DIRS@)
set(@PROJECT_NAME@_LIBRARY_DIRS @@PROJECT_NAME@_LIBRARY_DIRS@)
set(@PROJECT_NAME@_LIBRARIES @@PROJECT_NAME@_LIBRARIES@)
set(@PROJECT_NAME@_CXX_FLAGS @@PROJECT_NAME@_CXX_FLAGS@)
set(@PROJECT_NAME@_LINKER_FLAGS @@PROJECT_NAME@_LINKER_FLAGS@)
set(@PROJECT_NAME@_CXX_FLAGS "@@PROJECT_NAME@_CXX_FLAGS@")
set(@PROJECT_NAME@_LINKER_FLAGS "@@PROJECT_NAME@_LINKER_FLAGS@")
# Use a macro provided by CMake to check if all the listed arguments are valid and set @PROJECT_NAME@_FOUND accordingly.
# This is mainly important to check the version.
......
......@@ -10,6 +10,7 @@
# ${PROJECT_NAME}_LIBRARIES - list of libraries needed when linking against this project
# ${PROJECT_NAME}_CXX_FLAGS - list of additional C++ compiler flags needed when compiling against this project
# ${PROJECT_NAME}_LINKER_FLAGS - list of additional linker flags needed when linking against this project
# ${PROJECT_NAME}_MEXFLAGS - (optional) mex compiler flags
#
#######################################################################################################################
......@@ -34,9 +35,13 @@ foreach(LIBRARY ${LIST})
endforeach()
# force the lists to be space separated (may be sometimes semicolon separated)
string(REPLACE ";" " " ${PROJECT_NAME}_SOVERSION ${${PROJECT_NAME}_SOVERSION})
string(REPLACE ";" " " ${PROJECT_NAME}_INCLUDE_DIRS ${${PROJECT_NAME}_INCLUDE_DIRS})
string(REPLACE ";" " " ${PROJECT_NAME}_LIBRARY_DIRS ${${PROJECT_NAME}_LIBRARY_DIRS})
string(REPLACE ";" " " ${PROJECT_NAME}_LIBRARIES ${${PROJECT_NAME}_LIBRARIES})
string(REPLACE ";" " " ${PROJECT_NAME}_CXX_FLAGS ${${PROJECT_NAME}_CXX_FLAGS})
string(REPLACE ";" " " ${PROJECT_NAME}_LINKER_FLAGS ${${PROJECT_NAME}_LINKER_FLAGS})
string(REPLACE ";" " " ${PROJECT_NAME}_MEXFLAGS ${${PROJECT_NAME}_MEXFLAGS})
# we have nested @-statements, so we have to parse twice:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment