2012-08-19 03:04:55 +02:00
|
|
|
SET(SRC_LIST
|
2012-12-24 19:41:12 +01:00
|
|
|
utils.c
|
2012-08-19 03:04:55 +02:00
|
|
|
config.c
|
2012-09-28 03:53:43 +02:00
|
|
|
timeline.c
|
2012-12-24 19:41:12 +01:00
|
|
|
gamestate.c
|
2012-08-19 03:04:55 +02:00
|
|
|
)
|
|
|
|
|
2016-06-27 21:20:02 +02:00
|
|
|
SET(EXECUTABLE_SRC_LIST
|
|
|
|
main.c
|
|
|
|
)
|
|
|
|
|
2012-08-19 03:04:55 +02:00
|
|
|
find_package(Allegro5 REQUIRED)
|
|
|
|
find_package(Allegro5Font REQUIRED)
|
|
|
|
find_package(Allegro5TTF REQUIRED)
|
|
|
|
find_package(Allegro5Primitives REQUIRED)
|
|
|
|
find_package(Allegro5Audio REQUIRED)
|
|
|
|
find_package(Allegro5ACodec REQUIRED)
|
|
|
|
find_package(Allegro5Image REQUIRED)
|
2012-08-20 02:35:37 +02:00
|
|
|
if(APPLE)
|
|
|
|
find_package(Allegro5Main)
|
|
|
|
endif(APPLE)
|
2012-08-19 03:04:55 +02:00
|
|
|
|
2012-09-19 01:37:00 +02:00
|
|
|
if(MINGW)
|
2016-06-27 21:20:02 +02:00
|
|
|
# resource compilation for MinGW
|
|
|
|
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/icon.o COMMAND ${CMAKE_RC_COMPILER} -I${CMAKE_SOURCE_DIR} -i${CMAKE_SOURCE_DIR}/data/icons/icon.rc -o ${CMAKE_CURRENT_BINARY_DIR}/icon.o )
|
|
|
|
set(EXECUTABLE_SRC_LIST ${EXECUTABLE_SRC_LIST} ${CMAKE_CURRENT_BINARY_DIR}/icon.o)
|
|
|
|
set(LINK_FLAGS -Wl,-subsystem,windows)
|
2012-09-19 01:37:00 +02:00
|
|
|
endif(MINGW)
|
|
|
|
|
2016-06-27 21:20:36 +02:00
|
|
|
SET(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib/ticklemonster:\$ORIGIN/gamestates:\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/lib:\$ORIGIN/bin")
|
2012-09-20 01:46:29 +02:00
|
|
|
|
2012-09-30 10:02:07 +02:00
|
|
|
if(APPLE)
|
2016-06-27 21:20:36 +02:00
|
|
|
set(EXECUTABLE "TickleMonster")
|
2012-09-30 10:02:07 +02:00
|
|
|
else(APPLE)
|
2016-06-27 21:20:36 +02:00
|
|
|
set(EXECUTABLE "ticklemonster")
|
2012-09-30 10:02:07 +02:00
|
|
|
endif(APPLE)
|
|
|
|
|
2016-06-27 21:20:36 +02:00
|
|
|
add_library("libsuperderpy-ticklemonster" SHARED ${SRC_LIST})
|
2016-06-27 21:20:02 +02:00
|
|
|
add_executable(${EXECUTABLE} WIN32 MACOSX_BUNDLE ${EXECUTABLE_SRC_LIST})
|
2012-12-24 19:41:12 +01:00
|
|
|
|
2016-06-27 21:20:36 +02:00
|
|
|
SET_TARGET_PROPERTIES("libsuperderpy-ticklemonster" PROPERTIES PREFIX "")
|
2012-08-19 03:04:55 +02:00
|
|
|
|
2012-08-20 02:35:37 +02:00
|
|
|
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})
|
|
|
|
|
2016-06-27 21:20:36 +02:00
|
|
|
target_link_libraries(${EXECUTABLE} ${ALLEGRO5_LIBRARIES} ${ALLEGRO5_FONT_LIBRARIES} ${ALLEGRO5_TTF_LIBRARIES} ${ALLEGRO5_PRIMITIVES_LIBRARIES} ${ALLEGRO5_AUDIO_LIBRARIES} ${ALLEGRO5_ACODEC_LIBRARIES} ${ALLEGRO5_IMAGE_LIBRARIES} ${ALLEGRO5_MAIN_LIBRARIES} m dl libsuperderpy-ticklemonster)
|
2012-12-24 19:41:12 +01:00
|
|
|
|
2016-06-27 21:20:36 +02:00
|
|
|
target_link_libraries("libsuperderpy-ticklemonster" ${ALLEGRO5_LIBRARIES} ${ALLEGRO5_FONT_LIBRARIES} ${ALLEGRO5_TTF_LIBRARIES} ${ALLEGRO5_PRIMITIVES_LIBRARIES} ${ALLEGRO5_AUDIO_LIBRARIES} ${ALLEGRO5_ACODEC_LIBRARIES} ${ALLEGRO5_IMAGE_LIBRARIES} ${ALLEGRO5_MAIN_LIBRARIES} m)
|
2012-12-24 19:41:12 +01:00
|
|
|
|
2012-08-20 02:35:37 +02:00
|
|
|
if(ALLEGRO5_MAIN_FOUND)
|
2012-09-30 10:02:07 +02:00
|
|
|
target_link_libraries(${EXECUTABLE} ${ALLEGRO5_MAIN_LIBRARIES})
|
2012-08-20 02:35:37 +02:00
|
|
|
endif(ALLEGRO5_MAIN_FOUND)
|
|
|
|
|
2012-12-26 19:00:29 +01:00
|
|
|
add_subdirectory(gamestates)
|
|
|
|
|
2012-09-30 10:02:07 +02:00
|
|
|
install(TARGETS ${EXECUTABLE} DESTINATION ${BIN_INSTALL_DIR})
|
2016-06-27 21:20:36 +02:00
|
|
|
install(TARGETS "libsuperderpy-ticklemonster" DESTINATION ${LIB_INSTALL_DIR})
|