build: pass testmaps directory to testqbsp
This commit is contained in:
parent
ed8c758486
commit
67f7d7ec8b
|
|
@ -88,6 +88,11 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15)
|
|||
|
||||
find_package(TBB REQUIRED)
|
||||
|
||||
# just creates testmaps.hh with absolute path to the testmaps source directory.
|
||||
# include it as #include <testmaps.hh>
|
||||
configure_file(testmaps.hh.in testmaps.hh @ONLY)
|
||||
include_directories(${CMAKE_BINARY_DIR})
|
||||
|
||||
add_subdirectory(3rdparty)
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(bspinfo)
|
||||
|
|
|
|||
|
|
@ -45,9 +45,10 @@ add_custom_command(TARGET qbsp POST_BUILD
|
|||
|
||||
enable_testing()
|
||||
|
||||
set(QBSP_TEST_SOURCE
|
||||
set(QBSP_TEST_SOURCE
|
||||
test.cc
|
||||
test_qbsp.cc)
|
||||
test_qbsp.cc
|
||||
${CMAKE_BINARY_DIR}/testmaps.hh)
|
||||
add_executable(testqbsp ${QBSP_TEST_SOURCE})
|
||||
target_link_libraries (testqbsp libqbsp common ${CMAKE_THREAD_LIBS_INIT} TBB::tbb gtest fmt::fmt)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <qbsp/qbsp.hh>
|
||||
#include <qbsp/map.hh>
|
||||
#include <testmaps.hh>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
const char *testmaps_dir = "@CMAKE_SOURCE_DIR@/testmaps";
|
||||
Loading…
Reference in New Issue