summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 343273cd24122898bbba2a56c9713745559e453b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
cmake_minimum_required(VERSION 3.15)
project(MyBeatemup VERSION 0.0.1 LANGUAGES C)

set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)

find_package(raylib REQUIRED)
option(BEATEMUP_DEBUG "Enable or disable debug highlihts" OFF)

add_executable(game
    "include/game.h"
    "include/constants.h"
    "include/physics.h"
    "include/player.h"
    "include/assets.h"
    "include/background.h"
    "include/utils.h"
    
    "src/game.c"
    "src/main.c"
    "src/player.c"
    "src/assets.c"
    "src/background.c"
    "src/physics.c"
)

target_include_directories(game PRIVATE "include")
target_link_libraries(game raylib)

if (BEATEMUP_DEBUG)
    target_compile_definitions(game PRIVATE BEATEMUP_DEBUG)
endif()

if (UNIX)
    target_link_libraries(game m)
endif()

if (MSVC)
    target_link_libraries(game winmm)
endif()