-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
27 lines (21 loc) · 747 Bytes
/
CMakeLists.txt
File metadata and controls
27 lines (21 loc) · 747 Bytes
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
cmake_minimum_required(VERSION 3.10)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
project(wingsofvi-reader C)
set(VERSION "1.0.0")
file(GLOB SOURCES "src/*.c")
include(FetchContent)
FetchContent_Declare(
zlib
GIT_REPOSITORY https://github.com/madler/zlib.git
GIT_TAG 51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf # v1.3.1
)
FetchContent_MakeAvailable(zlib)
# i thought this would work, but it doesn't. i guess having global CMAKE_C_FLAGS
# for -m32 isn't too bad anyways though
# target_compile_options(zlib PRIVATE -m32)
add_compile_options(-Wall -g)
add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME} zlib)
target_include_directories(${PROJECT_NAME}
PRIVATE
${PROJECT_SOURCE_DIR}/include)