mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add cmake-format.py and formating all cmake files
This commit is contained in:
parent
7bbd8bab34
commit
bb15d17892
5 changed files with 105 additions and 69 deletions
|
|
@ -8,23 +8,19 @@ find_package(GTest)
|
|||
|
||||
add_executable(${PROJECT_NAME} ${SOURCES})
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../src)
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
VoxelEngineSrc
|
||||
GTest::gtest_main
|
||||
)
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../src)
|
||||
target_link_libraries(${PROJECT_NAME} VoxelEngineSrc GTest::gtest_main)
|
||||
|
||||
# HACK: copy res to test/ folder for fixing problem compatibility MultiConfig and non
|
||||
# MultiConfig builds. Delete in future and use only root res folder
|
||||
# Also this resolve problem with ctests, because it set cwd to CMAKE_CURRENT_BINARY_DIR
|
||||
# HACK: copy res to test/ folder for fixing problem compatibility MultiConfig
|
||||
# and non MultiConfig builds. Delete in future and use only root res folder Also
|
||||
# this resolve problem with ctests, because it set cwd to
|
||||
# CMAKE_CURRENT_BINARY_DIR
|
||||
add_custom_command(
|
||||
TARGET ${PROJECT_NAME}
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different
|
||||
${CMAKE_SOURCE_DIR}/res
|
||||
${CMAKE_CURRENT_BINARY_DIR}/res
|
||||
)
|
||||
TARGET ${PROJECT_NAME}
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different
|
||||
${CMAKE_SOURCE_DIR}/res ${CMAKE_CURRENT_BINARY_DIR}/res)
|
||||
|
||||
include(GoogleTest)
|
||||
gtest_discover_tests(${PROJECT_NAME})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue