CMakeLists for each C file

This commit is contained in:
2021-12-07 07:28:47 -08:00
parent a57e978f6c
commit 17b066e676
32 changed files with 321 additions and 38 deletions

View File

@ -7,13 +7,11 @@
cmake_minimum_required(VERSION 3.13)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Set some global flags
add_compile_definitions(
_CRT_SECURE_NO_WARNINGS=1
ASSET_PREFIX="../assets/"
ASSET_PREFIX="assets/"
)
# Do initial set up depending on the build target type.
@ -37,6 +35,15 @@ set(ASSETS_SOURCE_DIR "${ROOT_DIR}/assets")
set(ASSETS_BUILD_DIR "${BUILD_DIR}/assets")
set(TEMP_DIR "${BUILD_DIR}/temp")
# Add global sources.
add_subdirectory(lib)
# Setup Platform specific libraries
set(LIBS_PLATFORM "")
if(NOT WIN32)
list(APPEND LIBS_PLATFORM m)
endif()
# Include tools
add_subdirectory(tools)
@ -47,8 +54,6 @@ elseif(TARGET_TYPE STREQUAL game)
add_subdirectory(client)
endif()
# Add global sources.
add_subdirectory(lib)
# Set up shared assets
tool_copy(shader_textured