mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-09-13 01:09:32 -04:00
Move demos into separate CMakeLists.txt
This commit is contained in:
parent
a64d6825d5
commit
a8baa2df30
@ -36,16 +36,7 @@ IF(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
|||||||
TARGET_LINK_LIBRARIES(SDL2pp ${SDL2_LIBRARY})
|
TARGET_LINK_LIBRARIES(SDL2pp ${SDL2_LIBRARY})
|
||||||
|
|
||||||
# demos
|
# demos
|
||||||
SET(DEMOS
|
ADD_SUBDIRECTORY(demos)
|
||||||
sprites
|
|
||||||
lines
|
|
||||||
rendertarget
|
|
||||||
)
|
|
||||||
|
|
||||||
FOREACH(DEMO ${DEMOS})
|
|
||||||
ADD_EXECUTABLE(demo_${DEMO} demos/${DEMO}.cc)
|
|
||||||
TARGET_LINK_LIBRARIES(demo_${DEMO} SDL2pp)
|
|
||||||
ENDFOREACH(DEMO ${DEMOS})
|
|
||||||
ELSE(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
ELSE(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||||
MESSAGE(STATUS "libSDL2pp bundled build")
|
MESSAGE(STATUS "libSDL2pp bundled build")
|
||||||
|
|
||||||
|
10
demos/CMakeLists.txt
Normal file
10
demos/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
SET(DEMOS
|
||||||
|
sprites
|
||||||
|
lines
|
||||||
|
rendertarget
|
||||||
|
)
|
||||||
|
|
||||||
|
FOREACH(DEMO ${DEMOS})
|
||||||
|
ADD_EXECUTABLE(demo_${DEMO} ${DEMO}.cc)
|
||||||
|
TARGET_LINK_LIBRARIES(demo_${DEMO} SDL2pp)
|
||||||
|
ENDFOREACH(DEMO ${DEMOS})
|
Loading…
x
Reference in New Issue
Block a user