diff --git a/plugins/builtin/CMakeLists.txt b/plugins/builtin/CMakeLists.txt index fec4d1096..5248367e8 100644 --- a/plugins/builtin/CMakeLists.txt +++ b/plugins/builtin/CMakeLists.txt @@ -88,4 +88,5 @@ setupCompilerWarnings(${PROJECT_NAME}) set(LIBROMFS_RESOURCE_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/romfs) set(LIBROMFS_PROJECT_NAME ${PROJECT_NAME}) add_subdirectory(../../lib/external/libromfs ${CMAKE_CURRENT_BINARY_DIR}/libromfs) +set_target_properties(${LIBROMFS_LIBRARY} PROPERTIES POSITION_INDEPENDENT_CODE ON) target_link_libraries(${PROJECT_NAME} PRIVATE ${LIBROMFS_LIBRARY}) diff --git a/plugins/windows/CMakeLists.txt b/plugins/windows/CMakeLists.txt index 463ad1a2c..cf41e49cb 100644 --- a/plugins/windows/CMakeLists.txt +++ b/plugins/windows/CMakeLists.txt @@ -45,6 +45,7 @@ if (WIN32) set(LIBROMFS_RESOURCE_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/romfs) set(LIBROMFS_PROJECT_NAME ${PROJECT_NAME}) add_subdirectory(../../lib/external/libromfs ${CMAKE_CURRENT_BINARY_DIR}/libromfs) + set_target_properties(${LIBROMFS_LIBRARY} PROPERTIES POSITION_INDEPENDENT_CODE ON) target_link_libraries(${PROJECT_NAME} PRIVATE ${LIBROMFS_LIBRARY}) endif () \ No newline at end of file