spaceshooter/game/CMakeLists.txt

60 lines
1.3 KiB
CMake
Raw Permalink Normal View History

2023-04-30 20:49:25 +00:00
cmake_minimum_required(VERSION 3.0)
project(spaceshooter)
include_directories("lib/" "network/" "objects/")
set(SRC_GAME
autors.c
common.c
data.c
gameover.c
main.c
menu.c
networkcreate.c
networkgame.c
networkjoin.c
networklist.c
networkmode.c
networkout.c
networkparty.c
pause.c
single.c)
set(SRC_LIB
lib/common.c
lib/event.c
lib/instance.c
lib/interface.c
lib/media.c
lib/message.c
lib/screen.c
lib/timer.c)
set(SRC_NETWORK network/network.c)
set(SRC_OBJECTS objects/objects.c)
find_library(ALLEGRO_LIB NAMES allegro)
find_library(ALLEGRO_PRIMITIVES_LIB NAMES allegro_primitives)
find_library(ALLEGRO_DIALOG_LIB NAMES allegro_dialog)
find_library(ALLEGRO_IMAGE_LIB allegro_image)
find_library(ALLEGRO_FONT_LIB allegro_font)
find_library(ALLEGRO_TTF_LIB allegro_ttf)
find_library(ALLEGRO_AUDIO_LIB allegro_audio)
find_library(ALLEGRO_ACODEC_LIB allegro_acodec)
find_library(ENET_LIB enet)
add_executable(${PROJECT_NAME} ${SRC_OBJECTS} ${SRC_LIB} ${SRC_NETWORK} ${SRC_GAME})
target_link_libraries(${PROJECT_NAME}
${ALLEGRO_LIB}
${ALLEGRO_PRIMITIVES_LIB}
${ALLEGRO_DIALOG_LIB}
${ALLEGRO_IMAGE_LIB}
${ALLEGRO_COLOR_LIB}
${ALLEGRO_FONT_LIB}
${ALLEGRO_TTF_LIB}
${ALLEGRO_AUDIO_LIB}
${ALLEGRO_ACODEC_LIB}
${ENET_LIB})