Skip to content

Commit

Permalink
move SDL_SavePNG to the SDL compilation group, on cmake also
Browse files Browse the repository at this point in the history
This ports over this commit for scons:
ff857d1
  • Loading branch information
cbeck88 committed Nov 5, 2014
1 parent d137c37 commit a97d344
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ if(LIBDBUS_FOUND)
)
endif()

if(PNG_FOUND)
if(ENABLE_LIBPNG AND PNG_FOUND)
set_source_files_properties(
SDL_SavePNG/savepng.cpp
PROPERTIES
Expand All @@ -415,6 +415,15 @@ set(wesnoth-sdl_SRC
xBRZ/xbrz.cpp
)

# If requested, compile and link this file also to be able to save png files
if(ENABLE_LIBPNG AND PNG_FOUND)
set(wesnoth-sdl_SRC
${wesnoth-sdl_SRC}
SDL_SavePNG/savepng.cpp
)
endif(ENABLE_LIBPNG AND PNG_FOUND)


add_library(wesnoth-sdl
${LIBRARY_TYPE}
EXCLUDE_FROM_ALL
Expand Down Expand Up @@ -1065,14 +1074,6 @@ if(LIBDBUS_FOUND)
)
endif(LIBDBUS_FOUND)

# If requested, compile and link this file also to be able to save png files
if(ENABLE_LIBPNG AND PNG_FOUND)
set(libwesnoth-game_STAT_SRC
${libwesnoth-game_STAT_SRC}
SDL_SavePNG/savepng.cpp
)
endif(ENABLE_LIBPNG AND PNG_FOUND)

if(ENABLE_GAME AND ENABLE_TESTS)
set(libwesnoth-game_STAT_SRC
${libwesnoth-game_STAT_SRC}
Expand Down

0 comments on commit a97d344

Please sign in to comment.