cmake: Always build instructions lib with PIC

This commit is contained in:
Paweł Bylica 2019-11-28 19:34:17 +01:00
parent c3ae5bb539
commit 10e87931b1
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
1 changed files with 8 additions and 3 deletions

View File

@ -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})