#################################### CMAKE ##################################### cmake_minimum_required(VERSION 3.15) set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD_REQUIRED ON) #Include include(FetchContent) #################################### PROJECT ################################### project(Dawn VERSION 1.0) ##################################### SRCS ##################################### file(GLOB_RECURSE SOURCE_FILES ${CMAKE_SOURCE_DIR}/src/*.c) file(GLOB_RECURSE HEADER_FILES ${CMAKE_SOURCE_DIR}/src/*.h) file(COPY ${CMAKE_CURRENT_LIST_DIR}/assets DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) ##################################### LIBS ################ ##################### include_directories(${CMAKE_SOURCE_DIR}/lib/stb) ################################## EXECUTABLE ################################## add_executable(${PROJECT_NAME} ${HEADER_FILES} ${SOURCE_FILES}) ################################# STATIC LIBS ################################## # GLFW # find_package(glfw3 3.3.2) if(NOT glfw3_FOUND) FetchContent_Declare( glfw GIT_REPOSITORY https://github.com/glfw/glfw GIT_TAG 3.3.2 ) FetchContent_MakeAvailable(glfw) endif() target_link_libraries(${PROJECT_NAME} glfw) # CGLM # find_package(cglm) if(NOT cglm_FOUND) FetchContent_Declare( cglm GIT_REPOSITORY https://github.com/recp/cglm GIT_TAG v0.7.9 ) FetchContent_MakeAvailable(cglm) endif() target_link_libraries(${PROJECT_NAME} cglm) # OpenMP # find_package(OpenMP) # if (OPENMP_FOUND) # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") # set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") # endif() # Vulkan find_package(Vulkan REQUIRED FATAL_ERROR) target_link_libraries(${PROJECT_NAME} Vulkan::Vulkan)