CMake/project reorg
This commit is contained in:
parent
6134a66c71
commit
de686e7daa
@ -20,8 +20,20 @@ set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
|
|||||||
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||||
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
add_library(NBEvents ./src/NBEvents/Events.cpp)
|
set(BUILD_TESTS)
|
||||||
|
|
||||||
add_subdirectory(./src/NBCoreUtils)
|
if (BUILD_TESTS)
|
||||||
add_subdirectory(./src/NBWindow ./NBWindows)
|
include(FetchContent)
|
||||||
add_subdirectory(./tests ./tests)
|
FetchContent_Declare(
|
||||||
|
gtest
|
||||||
|
URL https://github.com/google/googletest/archive/refs/tags/release-1.12.1.zip
|
||||||
|
)
|
||||||
|
if (WIN32)
|
||||||
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||||
|
FetchContent_MakeAvailable(gtest)
|
||||||
|
endif()
|
||||||
|
include(GoogleTest)
|
||||||
|
set(GTEST_COLOR ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(./engine)
|
||||||
|
|||||||
3
engine/CMakeLists.txt
Normal file
3
engine/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
add_subdirectory(./NBCoreUtils)
|
||||||
|
add_subdirectory(./NBEvents)
|
||||||
|
add_subdirectory(./NBWindow)
|
||||||
7
engine/NBCoreUtils/CMakeLists.txt
Normal file
7
engine/NBCoreUtils/CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
include_directories(./.)
|
||||||
|
|
||||||
|
add_library(NBCore
|
||||||
|
./src/Errors.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_subdirectory(./tests)
|
||||||
5
engine/NBCoreUtils/tests/CMakeLists.txt
Normal file
5
engine/NBCoreUtils/tests/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.26.0)
|
||||||
|
project(gtest_Graphics VERSION 0.1.0 LANGUAGES C CXX)
|
||||||
|
|
||||||
|
add_subdirectory(./ErrorTest)
|
||||||
|
add_subdirectory(./SmartStreamTest)
|
||||||
5
engine/NBEvents/CMakeLists.txt
Normal file
5
engine/NBEvents/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
include_directories(./.)
|
||||||
|
|
||||||
|
add_library(NBEvents
|
||||||
|
./src/Events.cpp
|
||||||
|
)
|
||||||
8
engine/NBWindow/CMakeLists.txt
Normal file
8
engine/NBWindow/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
include_directories(./.)
|
||||||
|
|
||||||
|
|
||||||
|
add_library(NBWindow
|
||||||
|
./src/Window.cpp
|
||||||
|
./../../../glad/src/glad.c
|
||||||
|
)
|
||||||
|
target_link_libraries(NBWindow glfw)
|
||||||
@ -1,3 +0,0 @@
|
|||||||
add_library(NBCore
|
|
||||||
Errors.cpp
|
|
||||||
)
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
|
|
||||||
add_library(NBWindow Window.cpp ./../../../glad/src/glad.c)
|
|
||||||
target_link_libraries(NBWindow glfw)
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.26.0)
|
|
||||||
project(gtest_Graphics VERSION 0.1.0 LANGUAGES C CXX)
|
|
||||||
|
|
||||||
include(FetchContent)
|
|
||||||
FetchContent_Declare(
|
|
||||||
gtest
|
|
||||||
URL https://github.com/google/googletest/archive/refs/tags/release-1.12.1.zip
|
|
||||||
)
|
|
||||||
if (WIN32)
|
|
||||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
|
||||||
FetchContent_MakeAvailable(gtest)
|
|
||||||
endif()
|
|
||||||
include(GoogleTest)
|
|
||||||
set(GTEST_COLOR ON)
|
|
||||||
|
|
||||||
add_subdirectory(./ErrorTest)
|
|
||||||
add_subdirectory(./SmartStreamTest)
|
|
||||||
Loading…
x
Reference in New Issue
Block a user