[CMake] Fix configuration on older CMake
@@ -387,7 +387,11 @@ endif()
if(ARM_DYNAREC)
target_link_libraries(box86 dynarec)
endif()
+if(${CMAKE_VERSION} VERSION_LESS "3.13.5")
+ set_target_properties(box86 PROPERTIES LINK_FLAGS -rdynamic)
+else()
target_link_options(box86 PUBLIC -rdynamic)
+endif()
add_dependencies(box86 WRAPPERS)
add_dependencies(box86 PRINTER)
@@ -409,10 +413,17 @@ if(ARM_DYNAREC)
target_link_libraries(${BOX86} dynarec)
endif()
+if(${CMAKE_VERSION} VERSION_LESS "3.13.5")
+ set_target_properties(${BOX86} PROPERTIES LINK_FLAGS -rdynamic)
+ if(NOT NOLOADADDR)
+ set_target_properties(${BOX86} PROPERTIES LINK_FLAGS -Wl,-Ttext-segment,0x73800000)
+ endif()
+else()
target_link_options(${BOX86} PUBLIC -rdynamic)
if(NOT NOLOADADDR)
target_link_options(${BOX86} PUBLIC -Wl,-Ttext-segment,0x73800000)
endif()
+endif()
string(COMPARE EQUAL "${CMAKE_HOST_SYSTEM_PROCESSOR}" "i686" _x86)
string(COMPARE EQUAL "${CMAKE_HOST_SYSTEM_PROCESSOR}" "x86_64" _x86_64)
