Skip to content

Commit 56056ed

Browse files
committed
CMake: build position independent code, even in static liblsl
1 parent 544aacb commit 56056ed

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ function(lsllib_properties libname)
152152
target_include_directories(${libname}
153153
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
154154
)
155+
set_target_properties(${libname} PROPERTIES
156+
POSITION_INDEPENDENT_CODE On
157+
CXX_VISIBILITY_PRESET hidden)
155158
target_compile_definitions(${libname} PRIVATE
156159
LIBLSL_EXPORTS
157160
_SCL_SECURE_NO_WARNINGS _CRT_SECURE_NO_WARNINGS

0 commit comments

Comments
 (0)