Skip to content

Commit

Permalink
Use TARGET_INCLUDE_DIRECTORIES instead of INCLUDE_DIRECTORIES for SDL…
Browse files Browse the repository at this point in the history
…2, fixed MARK_AS_ADVANCED()
  • Loading branch information
Grumbel committed Aug 3, 2014
1 parent 3bdde1d commit 963fb96
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions CMakeLists.txt
Expand Up @@ -68,10 +68,7 @@ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})

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)
Expand Down Expand Up @@ -342,9 +339,12 @@ ADD_DEPENDENCIES(supertux2 gitversion)

## 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})
Expand Down Expand Up @@ -475,14 +475,13 @@ MARK_AS_ADVANCED(
)

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(
Expand Down

0 comments on commit 963fb96

Please sign in to comment.