Skip to content

Commit

Permalink
fix(fw/core): missing thread lib
Browse files Browse the repository at this point in the history
  • Loading branch information
berdal84 committed May 21, 2024
1 parent 84ee4a0 commit 0c8c528
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@ add_subdirectory(libs/SDL EXCLUDE_FROM_ALL) # SDL2
# 1) Nodable
#===========

ndbl_log("Looking for libraries ...")

find_package(Threads REQUIRED)
if (NOT Threads_FOUND)
ndbl_err("Threads not found")
endif ()

find_package(OpenGL REQUIRED)
if (NOT OpenGL_FOUND)
ndbl_err("OpenGL not found")
endif ()

ndbl_log("Threads found: ${Threads_FOUND}")
ndbl_log("OpenGL found: ${OpenGL_FOUND}")

# 1.1) Framework Core
#--------------------

Expand Down Expand Up @@ -110,6 +125,7 @@ target_link_libraries(
ghc_filesystem # c++ compatible std::filesystem::path like API
Observe # event system using observer/observable pattern.
glm # math
Threads::Threads
)

target_include_directories(
Expand Down Expand Up @@ -171,28 +187,12 @@ add_library(
libs/lodepng/lodepng.cpp
)

ndbl_log("Looking for libraries ...")

find_package(Threads REQUIRED)
if (NOT Threads_FOUND)
ndbl_err("Threads not found")
endif ()

find_package(OpenGL REQUIRED)
if (NOT OpenGL_FOUND)
ndbl_err("OpenGL not found")
endif ()

ndbl_log("Threads found: ${Threads_FOUND}")
ndbl_log("OpenGL found: ${OpenGL_FOUND}")

target_link_libraries(
framework-gui
PUBLIC
${CMAKE_DL_LIBS}
OpenGL::GL
SDL2-static SDL2main
Threads::Threads
nfd # native file dialog - extended
freetype # because: https://github.com/ocornut/imgui/tree/master/misc/freetype
framework-core
Expand Down

0 comments on commit 0c8c528

Please sign in to comment.