Skip to content

Commit

Permalink
build/watcher-c: start using a basic version script on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Will committed Oct 28, 2024
1 parent 968c011 commit e26f47e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,12 @@ function(wtr_add_lib_target NAME OUTPUT_NAME SRC_SET INC_SET LIB_TYPE)
set_property(TARGET "${NAME}" PROPERTY POSITION_INDEPENDENT_CODE ON)
set_property(TARGET "${NAME}" PROPERTY OUTPUT_NAME "${OUTPUT_NAME}")
target_compile_options("${NAME}" PRIVATE "${COMPILE_OPTIONS}")
target_link_options("${NAME}" PRIVATE "${LINK_OPTIONS}")
if("${NAME}" STREQUAL "watcher-c-shared" AND LINUX)
message(STATUS "watcher-c-shared: Adding version script")
target_link_options("${NAME}" PRIVATE "${LINK_OPTIONS};-Wl,--version-script=${CMAKE_SOURCE_DIR}/watcher-c/libwatcher-c.version")
else()
target_link_options("${NAME}" PRIVATE "${LINK_OPTIONS}")
endif()
target_link_libraries("${NAME}" PRIVATE "${LINK_LIBRARIES}")
if(APPLE)
set_property(TARGET "${NAME}" PROPERTY INSTALL_RPATH "/usr/local/lib")
Expand Down
4 changes: 0 additions & 4 deletions libwatcher-c.version

This file was deleted.

4 changes: 4 additions & 0 deletions watcher-c/libwatcher-c.version
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
WATCHER_C {
global: wtr_* ;
local: * ;
};

0 comments on commit e26f47e

Please sign in to comment.