vcpkg/ports/sdbus-cpp/pic.patch

15 lines
736 B
Diff
Raw Normal View History

2023-10-10 06:29:42 +08:00
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7332b23..822a594 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -130,7 +130,7 @@ target_compile_definitions(sdbus-c++-objlib PRIVATE
target_include_directories(sdbus-c++-objlib PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>)
-if(DEFINED BUILD_SHARED_LIBS)
+if(BUILD_SHARED_LIBS)
- set_target_properties(sdbus-c++-objlib PROPERTIES POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS})
+ set_target_properties(sdbus-c++-objlib PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
if(BUILD_LIBSYSTEMD)
add_dependencies(sdbus-c++-objlib LibsystemdBuildProject)