INCLUDE(FindPkgConfig)
PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
-INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS})
-
PKG_SEARCH_MODULE(SDL2IMAGE REQUIRED SDL2_image>=2.0.0)
-INCLUDE_DIRECTORIES(${SDL2IMAGE_INCLUDE_DIRS})
SET(HAVE_SDL TRUE)
OPTION(ENABLE_OPENGL "Enable OpenGL support" ON)
## Link supertux binary with squirrel and other libraries
-TARGET_LINK_LIBRARIES(supertux2 squirrel)
+TARGET_INCLUDE_DIRECTORIES(supertux2 PUBLIC ${SDL2_INCLUDE_DIRS})
+TARGET_INCLUDE_DIRECTORIES(supertux2 PUBLIC ${SDL2IMAGE_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(supertux2 ${SDL2_LIBRARIES})
TARGET_LINK_LIBRARIES(supertux2 ${SDL2IMAGE_LIBRARIES})
+
+TARGET_LINK_LIBRARIES(supertux2 squirrel)
TARGET_LINK_LIBRARIES(supertux2 ${OPENAL_LIBRARY})
TARGET_LINK_LIBRARIES(supertux2 ${OGGVORBIS_LIBRARIES})
TARGET_LINK_LIBRARIES(supertux2 ${PHYSFS_LIBRARY})
)
MARK_AS_ADVANCED(
- SDLMAIN_LIBRARY
- SDL_INCLUDE_DIR
- SDL_LIBRARY
+ SDL2_INCLUDE_DIRS
+ SDL2_LIBRARIES
)
MARK_AS_ADVANCED(
- SDLIMAGE_INCLUDE_DIR
- SDLIMAGE_LIBRARY
+ SDL2IMAGE_INCLUDE_DIRS
+ SDL2IMAGE_LIBRARIES
)
MARK_AS_ADVANCED(