Skip to content

Commit

Permalink
Fix CMakeLists.txt for SDL2 extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
r41k0u committed Dec 17, 2023
1 parent c41ef3f commit 079e829
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ set(SOURCES

target_sources(${PROJECT_NAME} PRIVATE ${SOURCES})
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
find_package(SDL2 REQUIRED)
find_package(SDL2_ttf REQUIRED)

find_package(PkgConfig)
pkg_check_modules(SDL2 REQUIRED sdl2 SDL2_ttf)

include_directories(${SDL2_INCLUDE_DIRS})

if (MSVC)
Expand All @@ -28,4 +30,4 @@ endif ()

target_link_libraries(${PROJECT_NAME} ${SDL2_LIBRARIES})

set(SDL2_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/include")
set(SDL2_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/include")

0 comments on commit 079e829

Please sign in to comment.