CMake: Add targets to allow (previously available) build by exec name

Seems to be needed only for MinGW/Unix Makefiles generator.
This commit is contained in:
Alexander Akulich 2023-03-07 22:22:09 +03:00
parent b9486ac0af
commit cb0192dd56

View file

@ -2588,6 +2588,19 @@ if(SERVER)
endif() endif()
endif() endif()
# Targets for compatibility with build commands previously available with Makefiles
if(CMAKE_GENERATOR MATCHES ".*Makefiles.*")
if(TARGET game-client)
add_custom_target(${CLIENT_EXECUTABLE})
add_dependencies(${CLIENT_EXECUTABLE} game-client)
endif()
if(TARGET game-server)
add_custom_target(${SERVER_EXECUTABLE})
add_dependencies(${SERVER_EXECUTABLE} game-server)
endif()
endif()
######################################################################## ########################################################################
# VARIOUS TARGETS # VARIOUS TARGETS
######################################################################## ########################################################################