forked from vsariola/fluxerator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
37 lines (28 loc) · 1.23 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.10)
cmake_policy(SET CMP0091 NEW)
set(CMAKE_VERBOSE_MAKEFILE ON)
project(fluxerator
VERSION 0.0.0
DESCRIPTION "fluxerator 4k intro"
LANGUAGES C CXX)
# Only do these if this is the main project, and not if it is included through add_subdirectory
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
# Let's ensure -std=c++xx instead of -std=g++xx
set(CMAKE_CXX_EXTENSIONS OFF)
# Let's nicely support folders in IDE's
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()
file(GLOB RKT_SYNC_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/extern/rocket/lib/*.c
)
add_library(rkt_sync ${RKT_SYNC_SRCS})
target_include_directories(rkt_sync PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/extern/rocket/lib)
set(RKT_PROJECT_INCLUDES ${RKT_PROJECT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/extern/rocket/lib)
# tell nasm that we want 32-bit OBJ file
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4")
set(CMAKE_ASM_NASM_OBJECT_FORMAT win32)
enable_language(ASM_NASM)
# remove flags from nasm as the same compile flags were causing trouble
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> <INCLUDES> <DEFINES> -w-label-orphan -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} -o <OBJECT> <SOURCE>")
add_subdirectory(src)
endif()