diff --git a/lib/loader/CMakeLists.txt b/lib/loader/CMakeLists.txt index 4d06b9b..cc4f5b4 100644 --- a/lib/loader/CMakeLists.txt +++ b/lib/loader/CMakeLists.txt @@ -9,11 +9,13 @@ add_library( ) add_library(evmc::loader ALIAS loader) -set_target_properties(loader PROPERTIES OUTPUT_NAME evmc-loader) -target_include_directories(loader PUBLIC $$) +set_target_properties(loader PROPERTIES + OUTPUT_NAME evmc-loader + POSITION_INDEPENDENT_CODE TRUE +) +target_include_directories(loader PUBLIC + $$ +) target_link_libraries(loader INTERFACE ${CMAKE_DL_LIBS}) -if(BUILD_SHARED_LIBS) - set_target_properties(loader PROPERTIES POSITION_INDEPENDENT_CODE TRUE) -endif() install(TARGETS loader EXPORT evmcTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})