Skip to content

Commit

Permalink
Fixed cmake sometimes not linking required libraries on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Wiseguy committed Apr 27, 2024
1 parent 7c37f8e commit fab4f66
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,12 @@ if (LINUX)

include_directories(${FREETYPE_LIBRARIES})
target_link_libraries(Zelda64Recompiled PRIVATE ${FREETYPE_LIBRARIES})

set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)

target_link_libraries(Zelda64Recompiled PRIVATE "-latomic -static-libstdc++")
target_link_libraries(Zelda64Recompiled PRIVATE "-latomic -static-libstdc++" ${CMAKE_DL_LIBS} Threads::Threads)
endif()

target_link_libraries(Zelda64Recompiled PRIVATE
Expand Down

0 comments on commit fab4f66

Please sign in to comment.