Skip to content

Commit

Permalink
Link with dl on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
emoon committed Feb 5, 2024
1 parent 5324416 commit 3733d88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ jobs:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libsdl2-dev cmake ninja-build

# Build with ninja

- name: Build quaesar
env:
CC: gcc-${{ matrix.gcc-version }}
CXX: gcc++-${{ matrix.gcc-version }}
run: mkdir temp && cd temp && cmake .. -G Ninja && ninja

linux_clang_ubuntu_20_04:
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ else()
target_compile_options(quaesar PRIVATE -DFILEFLAG_DIR=1 -D_ftelli64=ftello64 -D_fseeki64=fseeko64)
endif()

if (LINUX)
target_link_libraries(quaesar PRIVATE dl)
endif()

target_include_directories(quaesar PRIVATE ${SDL2_INCLUDE_DIRS} "src/external/zlib")
target_link_libraries(quaesar PRIVATE ${SDL2_LIBRARIES} zlibstatic)

Expand Down

0 comments on commit 3733d88

Please sign in to comment.