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}