Skip to content

Commit 2e04c0f

Browse files
committed
Add PIC static library for shared library building.
1 parent a2c9197 commit 2e04c0f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER ${OSI_PROTO_FILES})
66
add_library(open_simulation_interface STATIC ${PROTO_SRC} ${PROTO_HEADER})
77
target_include_directories(open_simulation_interface PUBLIC ${PROTOBUF_INCLUDE_DIR})
88
target_link_libraries(open_simulation_interface PUBLIC ${PROTOBUF_LIBRARY})
9+
add_library(open_simulation_interface_pic STATIC ${PROTO_SRC} ${PROTO_HEADER})
10+
set_property(TARGET open_simulation_interface_pic PROPERTY POSITION_INDEPENDENT_CODE ON)
11+
target_include_directories(open_simulation_interface_pic PUBLIC ${PROTOBUF_INCLUDE_DIR})
12+
target_link_libraries(open_simulation_interface_pic PUBLIC ${PROTOBUF_LIBRARY})
913
set (OSI_PROTOBUF_INCLUDE_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "[OSI] Path to generated protobuf files for the open simulation interface.")

0 commit comments

Comments
 (0)