don't build any app directly from root CMakeLists.txt

This commit is contained in:
veclav talica 2024-09-25 19:37:39 +03:00
parent a7d97a1070
commit a500fcd97c

View File

@ -353,11 +353,6 @@ link_deps(${TWN_TARGET})
target_link_libraries(${TWN_TARGET} PUBLIC twn_third_parties) target_link_libraries(${TWN_TARGET} PUBLIC twn_third_parties)
target_include_directories(${TWN_TARGET} PRIVATE ${TWN_ROOT_DIR}/src) target_include_directories(${TWN_TARGET} PRIVATE ${TWN_ROOT_DIR}/src)
# build the testgame if this cmake list is built directly
if(${CMAKE_PROJECT_NAME} MATCHES townengine)
add_subdirectory(apps/testgame)
endif()
# move compie_commands.json into root directory so that it plays nicer with code editors without any configuration # move compie_commands.json into root directory so that it plays nicer with code editors without any configuration
add_custom_target(copy-compile-commands ALL add_custom_target(copy-compile-commands ALL
${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/compile_commands.json ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/compile_commands.json