Skip to content

Commit

Permalink
project template
Browse files Browse the repository at this point in the history
  • Loading branch information
fdefelici committed Jun 13, 2024
0 parents commit 87aa718
Show file tree
Hide file tree
Showing 21 changed files with 9,272 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.vscode/*
!.vscode/settings.json
.vs/
CMakeUserPresets.json
build/
60 changes: 60 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"cmake.configureSettings": {
"CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "./conan_provider.cmake"
},
"files.associations": {
"format": "cpp",
"xstring": "cpp",
"algorithm": "cpp",
"cmath": "cpp",
"atomic": "cpp",
"bit": "cpp",
"cctype": "cpp",
"charconv": "cpp",
"clocale": "cpp",
"compare": "cpp",
"concepts": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"exception": "cpp",
"string": "cpp",
"initializer_list": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"iterator": "cpp",
"limits": "cpp",
"locale": "cpp",
"memory": "cpp",
"new": "cpp",
"optional": "cpp",
"ostream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"utility": "cpp",
"xfacet": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocbuf": "cpp",
"xlocinfo": "cpp",
"xlocmes": "cpp",
"xlocmon": "cpp",
"xlocnum": "cpp",
"xloctime": "cpp",
"xmemory": "cpp",
"xtr1common": "cpp",
"xutility": "cpp",
"fstream": "cpp",
"vector": "cpp"
}
}
28 changes: 28 additions & 0 deletions CMakelists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
cmake_minimum_required(VERSION 3.28)
project(AivBox2D)

set(EXEC_TARGET AppPrj)
file(GLOB_RECURSE SOURCES ${CMAKE_SOURCE_DIR}/src/*.cpp)
file(GLOB_RECURSE HEADERS ${CMAKE_SOURCE_DIR}/src/*.h ${CMAKE_SOURCE_DIR}/include/*.h)

add_executable(${EXEC_TARGET} ${HEADERS} ${SOURCES})
set_property(TARGET ${EXEC_TARGET} PROPERTY CXX_STANDARD 20)
target_include_directories(${EXEC_TARGET} PRIVATE include src)

#Library linking and Headers import
find_package(glad REQUIRED)
find_package(glfw3 REQUIRED)
find_package(glm REQUIRED)

target_link_libraries(${EXEC_TARGET} PRIVATE
glad::glad
glfw
glm::glm
)

# Post build: Copy Resources to bin
set(ResourcesPath ${CMAKE_CURRENT_SOURCE_DIR}/resources)
add_custom_command(TARGET ${EXEC_TARGET} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Copy Resources..."
COMMAND ${CMAKE_COMMAND} -E copy_directory ${ResourcesPath} $<TARGET_FILE_DIR:${EXEC_TARGET}>/resources
)
Loading

0 comments on commit 87aa718

Please sign in to comment.