move building gamestates to separate CMakeLists file

This commit is contained in:
Sebastian Krzyszkowiak 2012-12-26 19:00:29 +01:00
parent 725918e3b4
commit 91c49e927f
2 changed files with 12 additions and 6 deletions

View file

@ -23,7 +23,7 @@ if(MINGW)
set(LINK_FLAGS -Wl,-subsystem,windows)
endif(MINGW)
SET(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib/superderpy:\$ORIGIN:\$ORIGIN/../lib")
SET(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib/superderpy:\$ORIGIN/gamestates:\$ORIGIN:\$ORIGIN/../lib")
#IF(${PACKAGE_BUILD})
# SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
@ -37,11 +37,9 @@ else(APPLE)
endif(APPLE)
add_library("libsuperderpy" SHARED ${SRC_LIST})
add_library("libsuperderpy-muffinattack-disclaimer" SHARED "gamestates/disclaimer.c")
add_executable(${EXECUTABLE} WIN32 MACOSX_BUNDLE "main.c")
SET_TARGET_PROPERTIES("libsuperderpy" PROPERTIES PREFIX "")
SET_TARGET_PROPERTIES("libsuperderpy-muffinattack-disclaimer" PROPERTIES PREFIX "")
include_directories(${ALLEGRO5_INCLUDE_DIR} ${ALLEGRO5_FONT_INCLUDE_DIR} ${ALLEGRO5_TTF_INCLUDE_DIR} ${ALLEGRO5_PRIMITIVES_INCLUDE_DIR} ${ALLEGRO5_AUDIO_INCLUDE_DIR} ${ALLEGRO5_ACODEC_INCLUDE_DIR} ${ALLEGRO5_IMAGE_INCLUDE_DIR})
@ -49,11 +47,11 @@ target_link_libraries(${EXECUTABLE} ${ALLEGRO5_LIBRARIES} ${ALLEGRO5_FONT_LIBRAR
target_link_libraries("libsuperderpy" ${ALLEGRO5_LIBRARIES} ${ALLEGRO5_FONT_LIBRARIES} ${ALLEGRO5_TTF_LIBRARIES} ${ALLEGRO5_PRIMITIVES_LIBRARIES} ${ALLEGRO5_AUDIO_LIBRARIES} ${ALLEGRO5_ACODEC_LIBRARIES} ${ALLEGRO5_IMAGE_LIBRARIES} ${ALLEGRO5_MAIN_LIBRARIES} m)
target_link_libraries("libsuperderpy-muffinattack-disclaimer" ${ALLEGRO5_LIBRARIES} ${ALLEGRO5_FONT_LIBRARIES} ${ALLEGRO5_TTF_LIBRARIES} ${ALLEGRO5_PRIMITIVES_LIBRARIES} ${ALLEGRO5_AUDIO_LIBRARIES} ${ALLEGRO5_ACODEC_LIBRARIES} ${ALLEGRO5_IMAGE_LIBRARIES} ${ALLEGRO5_MAIN_LIBRARIES} m libsuperderpy)
if(ALLEGRO5_MAIN_FOUND)
target_link_libraries(${EXECUTABLE} ${ALLEGRO5_MAIN_LIBRARIES})
endif(ALLEGRO5_MAIN_FOUND)
add_subdirectory(gamestates)
install(TARGETS ${EXECUTABLE} DESTINATION ${BIN_INSTALL_DIR})
install(TARGETS "libsuperderpy" DESTINATION ${LIB_INSTALL_DIR})

View file

@ -0,0 +1,8 @@
add_library("libsuperderpy-muffinattack-disclaimer" SHARED "disclaimer.c")
SET_TARGET_PROPERTIES("libsuperderpy-muffinattack-disclaimer" PROPERTIES PREFIX "")
target_link_libraries("libsuperderpy-muffinattack-disclaimer" ${ALLEGRO5_LIBRARIES} ${ALLEGRO5_FONT_LIBRARIES} ${ALLEGRO5_TTF_LIBRARIES} ${ALLEGRO5_PRIMITIVES_LIBRARIES} ${ALLEGRO5_AUDIO_LIBRARIES} ${ALLEGRO5_ACODEC_LIBRARIES} ${ALLEGRO5_IMAGE_LIBRARIES} ${ALLEGRO5_MAIN_LIBRARIES} m libsuperderpy)
install(TARGETS "libsuperderpy-muffinattack-disclaimer" DESTINATION ${LIB_INSTALL_DIR})