Skip to content

Commit

Permalink
Link with libgomp if found
Browse files Browse the repository at this point in the history
  • Loading branch information
Cacodemon345 committed Feb 3, 2024
1 parent 30eed6e commit 12f889b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sound/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ if(FLUIDSYNTH)
pkg_check_modules(FLUIDSYNTH REQUIRED IMPORTED_TARGET fluidsynth)
target_link_libraries(86Box PkgConfig::FLUIDSYNTH)
if(STATIC_BUILD)
target_link_libraries(86Box -static ${FLUIDSYNTH_STATIC_LIBRARIES} -fopenmp)
find_library(LIBGOMP_LIBRARY gomp)
if ("${LIBGOMP_LIBRARY}" MATCHES "NOTFOUND")
target_link_libraries(86Box -static ${FLUIDSYNTH_STATIC_LIBRARIES} -fopenmp)
else()
target_link_libraries(86Box -static ${FLUIDSYNTH_STATIC_LIBRARIES} -fopenmp gomp)
endif()
endif()

target_compile_definitions(snd PRIVATE USE_FLUIDSYNTH)
Expand Down

0 comments on commit 12f889b

Please sign in to comment.