From a1b66e99f0fee32f72cb39676e1fc9c957cba96d Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Tue, 24 Oct 2017 20:16:48 +0100 Subject: [PATCH] Search for SDL2 in cloonelgraphics. --- src/cloonelgraphics/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cloonelgraphics/CMakeLists.txt b/src/cloonelgraphics/CMakeLists.txt index 7181f1b..a723277 100644 --- a/src/cloonelgraphics/CMakeLists.txt +++ b/src/cloonelgraphics/CMakeLists.txt @@ -1,4 +1,7 @@ project(cloonelgraphics CXX) +include(FindPkgConfig) + +pkg_search_module(SDL2 REQUIRED IMPORTED_TARGET sdl2) add_library(${PROJECT_NAME} texture.cpp @@ -11,13 +14,12 @@ add_library(${PROJECT_NAME} ) target_link_libraries(${PROJECT_NAME} - PRIVATE ${SDL2_LIBRARIES} + PRIVATE PkgConfig::SDL2 PRIVATE ${PHYSFS_LIBRARY} PRIVATE ${PNG_LIBRARIES} ) target_include_directories(${PROJECT_NAME} - PRIVATE ${SDL2_INCLUDE_DIR} PRIVATE ${PNG_INCLUDE_DIRS} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} PRIVATE ${PHYSFS_INCLUDE_DIR}