MODULES_BUILD_DESKTOP, MODULES_BUILD_TESTS and MODULES_BUILD_EXAMPLES default to on everywhere except Android. Wayland, the window layer, ImGui, GLFW, OIDN, PortAudio and the desktop applications build only with the desktop option. Graphics gains a GraphicsVulkan library with the platform-free Vulkan context, GPU timer and frame code. UnitTest++ is built from Externals/unittest-cpp directly instead of through lalr, which nothing else uses. Presets: linux-debug, linux-release, android-arm64-debug and android-arm64-release (NDK toolchain from ANDROID_NDK_HOME, API 31, arm64-v8a).
37 lines
1.3 KiB
CMake
37 lines
1.3 KiB
CMake
project(Containers)
|
|
|
|
### ---------------------- Static Library --------------------- ###
|
|
file(GLOB SOURCES "./private/*.cpp")
|
|
file(GLOB HEADERS "./public/*.hpp")
|
|
add_library(${PROJECT_NAME} STATIC ${SOURCES} ${HEADERS})
|
|
target_include_directories(${PROJECT_NAME} PUBLIC ./public/)
|
|
target_include_directories(${PROJECT_NAME} PUBLIC ./private/)
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC Modules)
|
|
|
|
### -------------------------- Tests -------------------------- ###
|
|
if (MODULES_BUILD_TESTS)
|
|
include(GoogleTest)
|
|
file(GLOB TEST_SOURCES
|
|
./tests/Buffer2DTest.cpp
|
|
./tests/BufferTest.cpp
|
|
./tests/IntervalTreeTests.cpp
|
|
./tests/ListTest.cpp
|
|
./tests/MapTest.cpp
|
|
./tests/TreeTest.cpp
|
|
./tests/RingBufferByte.cpp
|
|
./tests/Tests.cpp
|
|
)
|
|
|
|
add_executable(Tests${PROJECT_NAME} ${TEST_SOURCES})
|
|
target_link_libraries(Tests${PROJECT_NAME} ${PROJECT_NAME} UnitTest++)
|
|
add_test(NAME Tests${PROJECT_NAME} COMMAND Tests${PROJECT_NAME})
|
|
|
|
|
|
add_executable(testLinearRingBuffer ./tests/testLinearRingBuffer.cpp)
|
|
target_link_libraries(testLinearRingBuffer ${PROJECT_NAME} gtest)
|
|
gtest_discover_tests(testLinearRingBuffer)
|
|
|
|
|
|
add_executable(AVLTreeSpeedTest ./tests/AVLTreeProfiling.cpp)
|
|
target_link_libraries(AVLTreeSpeedTest ${PROJECT_NAME})
|
|
endif ()
|