Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.cache/
build/*
vcpkg_installed/*
lib/*
27 changes: 19 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
cmake_minimum_required(VERSION 3.19)

set(CMAKE_POLICY_VERSION_MINIMUM "3.10")
set(CMAKE_WARN_DEPRECATED FALSE)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

include("${CMAKE_CURRENT_LIST_DIR}/cmake/deps.cmake")

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED True)

project(learndaxa VERSION 1.0)
project(learndaxa
VERSION 1.0
HOMEPAGE_URL https://github.com/learndaxa/tutorial-starting-point
)

file(GLOB_RECURSE SRCS ${PROJECT_SOURCE_DIR}/src/*.cpp)

Expand All @@ -14,12 +21,16 @@ foreach(file ${SRCS})
message(STATUS ${file})
endforeach()

add_executable(${PROJECT_NAME} ${SRCS})
add_executable(${PROJECT_NAME}
${SRCS}
)

target_include_directories(${PROJECT_NAME} PUBLIC include)
target_include_directories(${PROJECT_NAME}
PUBLIC include
)

find_package(glfw3 CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE glfw)
target_link_libraries(${PROJECT_NAME}
PRIVATE glfw
PRIVATE daxa::daxa
)

find_package(daxa CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE daxa::daxa)
147 changes: 79 additions & 68 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,81 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 19,
"patch": 0
},
"configurePresets": [
{
"name": "Debug",
"description": "Debug configuration",
"hidden": false,
"generator": "Visual Studio 17 2022",
"binaryDir": "${sourceDir}/build/Debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "Release",
"description": "Release configuration",
"hidden": false,
"generator": "Visual Studio 17 2022",
"binaryDir": "${sourceDir}/build/Release",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "Debug",
"description": "Debug configuration",
"hidden": false,
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/Debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "Release",
"description": "Release configuration",
"hidden": false,
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/Release",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
}
]
"version": 3,
"configurePresets": [
{
"name": "Default-Windows",
"hidden": true,
"generator": "Visual Studio 17 2022",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "Default-Linux",
"hidden": true,
"generator": "Ninja",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"cacheVariables": {
"CMAKE_C_COMPILER": "/usr/bin/clang",
"CMAKE_CXX_COMPILER": "/usr/bin/clang++"
}
},
{
"name": "Default-Debug",
"hidden": true,
"binaryDir": "${sourceDir}/build/Debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "Default-Release",
"hidden": true,
"binaryDir": "${sourceDir}/build/Release",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "Debug-Windows",
"hidden": false,
"inherits": [
"Default-Windows",
"Default-Debug"
],
"displayName": "Debug Windows"
},
{
"name": "Debug-Linux",
"hidden": false,
"inherits": [
"Default-Linux",
"Default-Debug"
],
"displayName": "Debug Linux"
},
{
"name": "Release-Windows",
"hidden": false,
"inherits": [
"Default-Windows",
"Default-Release"
],
"displayName": "Release Windows"
},
{
"name": "Release-Linux",
"hidden": false,
"inherits": [
"Default-Linux",
"Default-Release"
],
"displayName": "Release Linux"
}
]
}
Loading