Use linker groups on gcc to fix geomserver build

This commit is contained in:
Thomas Krijnen
2023-03-31 21:58:53 +02:00
parent 99abc6e0e2
commit 48798ae07d
+4
View File
@@ -392,8 +392,12 @@ if(OCCT_STATIC)
else() else()
# OPENCASCADE_LIBRARIES repeated N times below in order to fix cyclic dependencies - use --start-group ... --end-group instead? # OPENCASCADE_LIBRARIES repeated N times below in order to fix cyclic dependencies - use --start-group ... --end-group instead?
# tfk: --start-group ... --end-group didn't work on the apple linker when last tested # tfk: --start-group ... --end-group didn't work on the apple linker when last tested
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(OPENCASCADE_LIBRARIES -Wl,--start-group ${OPENCASCADE_LIBRARIES} -Wl,--end-group)
else()
set(OPENCASCADE_LIBRARIES ${OPENCASCADE_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) set(OPENCASCADE_LIBRARIES ${OPENCASCADE_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
endif() endif()
endif()
if (NOT APPLE AND NOT WIN32) if (NOT APPLE AND NOT WIN32)
set(OPENCASCADE_LIBRARIES ${OPENCASCADE_LIBRARIES} "rt") set(OPENCASCADE_LIBRARIES ${OPENCASCADE_LIBRARIES} "rt")