cmake: Always build instructions lib with PIC
@@ -10,8 +10,13 @@ add_library(
)
add_library(evmc::instructions ALIAS instructions)
-set_target_properties(instructions PROPERTIES OUTPUT_NAME evmc-instructions)
-target_include_directories(instructions PUBLIC $<BUILD_INTERFACE:${include_dir}>$<INSTALL_INTERFACE:include>)
+set_target_properties(instructions PROPERTIES
+ OUTPUT_NAME evmc-instructions
+ POSITION_INDEPENDENT_CODE TRUE
+)
+target_include_directories(instructions PUBLIC
+ $<BUILD_INTERFACE:${include_dir}>$<INSTALL_INTERFACE:include>
+)
if(EVMC_INSTALL)
install(TARGETS instructions EXPORT evmcTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
