Skip to content

Commit

Permalink
[cmake] fix: Only modify CMAKE_SHARED_LINKER_FLAGS if defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
NilsBrause committed Oct 10, 2019
1 parent 76af23f commit 7c72bbd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ cmake_dependent_option(BUILD_EXAMPLES
"BUILD_LIBRARIES" OFF)

# Do not report undefined references in libraries, since the protocol libraries cannot be used on their own.
string(REPLACE "-Wl,--no-undefined" "" CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS})
if(CMAKE_SHARED_LINKER_FLAGS)
string(REPLACE "-Wl,--no-undefined" " " CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS})
endif()

# variables for .pc.in files
set(prefix "${CMAKE_INSTALL_PREFIX}")
Expand Down

0 comments on commit 7c72bbd

Please sign in to comment.