mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-02-05 07:55:44 +00:00
Move libprojectM tests into subdirectory.
This commit is contained in:
@ -1,25 +1 @@
|
||||
find_package(GTest 1.10 REQUIRED NO_MODULE)
|
||||
|
||||
add_executable(projectM-unittest
|
||||
PCMTest.cpp
|
||||
)
|
||||
|
||||
target_compile_definitions(projectM-unittest
|
||||
PRIVATE
|
||||
PROJECTM_TEST_DATA_DIR="${CMAKE_CURRENT_LIST_DIR}/data"
|
||||
)
|
||||
|
||||
# Test includes a header file from libprojectM with its full path in the source dir.
|
||||
target_include_directories(projectM-unittest
|
||||
PRIVATE
|
||||
"${CMAKE_SOURCE_DIR}"
|
||||
)
|
||||
|
||||
target_link_libraries(projectM-unittest
|
||||
PRIVATE
|
||||
projectM_static
|
||||
GTest::gtest
|
||||
GTest::gtest_main
|
||||
)
|
||||
|
||||
add_test(NAME projectM-unittest COMMAND projectM-unittest)
|
||||
add_subdirectory(libprojectM)
|
||||
|
||||
25
tests/libprojectM/CMakeLists.txt
Normal file
25
tests/libprojectM/CMakeLists.txt
Normal file
@ -0,0 +1,25 @@
|
||||
find_package(GTest 1.10 REQUIRED NO_MODULE)
|
||||
|
||||
add_executable(projectM-unittest
|
||||
PCMTest.cpp
|
||||
)
|
||||
|
||||
target_compile_definitions(projectM-unittest
|
||||
PRIVATE
|
||||
PROJECTM_TEST_DATA_DIR="${CMAKE_CURRENT_LIST_DIR}/data"
|
||||
)
|
||||
|
||||
# Test includes a header file from libprojectM with its full path in the source dir.
|
||||
target_include_directories(projectM-unittest
|
||||
PRIVATE
|
||||
"${CMAKE_SOURCE_DIR}"
|
||||
)
|
||||
|
||||
target_link_libraries(projectM-unittest
|
||||
PRIVATE
|
||||
projectM_static
|
||||
GTest::gtest
|
||||
GTest::gtest_main
|
||||
)
|
||||
|
||||
add_test(NAME projectM-unittest COMMAND projectM-unittest)
|
||||
Reference in New Issue
Block a user