2018-12-08 01:46:08 +01:00
|
|
|
set(EXECUTABLE ${LIBSUPERDERPY_GAMENAME})
|
|
|
|
|
2019-11-11 21:23:43 +01:00
|
|
|
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}/${LIBSUPERDERPY_GAMENAME}:\$ORIGIN/gamestates:\$ORIGIN:\$ORIGIN/../${LIB_DIR}:\$ORIGIN/${LIB_DIR}:\$ORIGIN/${BIN_DIR}")
|
2018-12-08 01:46:08 +01:00
|
|
|
|
|
|
|
if(MINGW)
|
|
|
|
# resource compilation for MinGW
|
|
|
|
if (EXISTS ${CMAKE_SOURCE_DIR}/data/icons/icon.rc)
|
|
|
|
set(EXECUTABLE_SRC_LIST ${EXECUTABLE_SRC_LIST} ${CMAKE_SOURCE_DIR}/data/icons/icon.rc)
|
|
|
|
endif (EXISTS ${CMAKE_SOURCE_DIR}/data/icons/icon.rc)
|
|
|
|
endif(MINGW)
|
|
|
|
|
|
|
|
if (APPLE)
|
|
|
|
if (EXISTS ${CMAKE_SOURCE_DIR}/data/icons/${LIBSUPERDERPY_GAMENAME}.icns)
|
|
|
|
set(EXECUTABLE_SRC_LIST ${EXECUTABLE_SRC_LIST} ${CMAKE_SOURCE_DIR}/data/icons/${LIBSUPERDERPY_GAMENAME}.icns)
|
|
|
|
set_source_files_properties(${CMAKE_SOURCE_DIR}/data/icons/${LIBSUPERDERPY_GAMENAME}.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
|
|
|
endif (EXISTS ${CMAKE_SOURCE_DIR}/data/icons/${LIBSUPERDERPY_GAMENAME}.icns)
|
|
|
|
endif(APPLE)
|
|
|
|
|
|
|
|
add_libsuperderpy_target("${EXECUTABLE_SRC_LIST}")
|
2019-02-26 01:42:16 +01:00
|
|
|
target_link_libraries(${EXECUTABLE} "lib${LIBSUPERDERPY_GAMENAME}")
|
2019-01-13 21:34:32 +01:00
|
|
|
if (APPLE)
|
2020-04-25 19:28:26 +02:00
|
|
|
target_link_libraries(${EXECUTABLE} ${Allegro5Main_LIBRARIES})
|
2019-01-13 21:34:32 +01:00
|
|
|
endif(APPLE)
|
2019-11-11 21:23:43 +01:00
|
|
|
install(TARGETS ${EXECUTABLE} DESTINATION ${CMAKE_INSTALL_PREFIX}/${BIN_DIR})
|
2018-12-08 01:46:08 +01:00
|
|
|
|
2019-05-17 17:35:07 +02:00
|
|
|
if (LIBSUPERDERPY_STATIC_COMMON)
|
2019-05-17 02:31:17 +02:00
|
|
|
add_library("lib${LIBSUPERDERPY_GAMENAME}" STATIC ${SHARED_SRC_LIST})
|
2019-05-17 17:35:07 +02:00
|
|
|
else(LIBSUPERDERPY_STATIC_COMMON)
|
|
|
|
add_library("lib${LIBSUPERDERPY_GAMENAME}" SHARED ${SHARED_SRC_LIST})
|
|
|
|
endif(LIBSUPERDERPY_STATIC_COMMON)
|
2019-05-17 02:31:17 +02:00
|
|
|
|
2019-02-26 01:42:16 +01:00
|
|
|
set_target_properties("lib${LIBSUPERDERPY_GAMENAME}" PROPERTIES PREFIX "")
|
2019-05-17 02:31:17 +02:00
|
|
|
target_link_libraries("lib${LIBSUPERDERPY_GAMENAME}" libsuperderpy ${LIBSUPERDERPY_EXTRA_LIBS})
|
2019-11-11 21:23:43 +01:00
|
|
|
install(TARGETS "lib${LIBSUPERDERPY_GAMENAME}" DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_DIR})
|
2018-12-08 01:46:08 +01:00
|
|
|
|
|
|
|
add_subdirectory("gamestates")
|
|
|
|
|
2019-05-17 02:31:17 +02:00
|
|
|
if(LIBSUPERDERPY_STATIC_GAMESTATES)
|
|
|
|
target_link_libraries(${EXECUTABLE} libsuperderpy-gamestates)
|
|
|
|
endif(LIBSUPERDERPY_STATIC_GAMESTATES)
|
|
|
|
|
2018-12-08 01:46:08 +01:00
|
|
|
libsuperderpy_copy(${EXECUTABLE})
|
2019-05-17 02:31:17 +02:00
|
|
|
|
|
|
|
target_link_libraries(${EXECUTABLE} ${LIBSUPERDERPY_EXTRA_LIBS})
|