mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #6413
6413: CMake: Fix installation for optional targets r=edg-l a=Kaffeine Closes https://github.com/ddnet/ddnet/issues/6412 <!-- What is the motivation for the changes of this pull request? --> <!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your pull request. --> ## Checklist I've checked that both `-DCLIENT=OFF` and `-DSERVER=OFF` do not breaks the install target. - [ ] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test (especially base/) or added coverage to integration test - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Alexander Akulich <akulichalexander@gmail.com>
This commit is contained in:
commit
2ae514db1f
|
@ -2988,11 +2988,15 @@ else()
|
|||
set(TARGET_TOOLS)
|
||||
endif()
|
||||
|
||||
set(CPACK_TARGETS
|
||||
game-client
|
||||
game-server
|
||||
${TARGET_TOOLS}
|
||||
)
|
||||
set(CPACK_TARGETS)
|
||||
if(TARGET game-client)
|
||||
list(APPEND CPACK_TARGETS game-client)
|
||||
endif()
|
||||
if(TARGET game-server)
|
||||
list(APPEND CPACK_TARGETS game-server)
|
||||
endif()
|
||||
list(APPEND CPACK_TARGETS ${TARGET_TOOLS})
|
||||
|
||||
if(STEAMAPI_KIND STREQUAL SHARED)
|
||||
list(APPEND CPACK_TARGETS ${TARGET_STEAMAPI})
|
||||
endif()
|
||||
|
@ -3019,11 +3023,15 @@ endif()
|
|||
if(NOT DEV)
|
||||
include(GNUInstallDirs)
|
||||
install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/ddnet COMPONENT data)
|
||||
install(TARGETS game-client DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT client)
|
||||
if(TARGET game-client)
|
||||
install(TARGETS game-client DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT client)
|
||||
endif()
|
||||
if(STEAMAPI_KIND STREQUAL SHARED)
|
||||
install(TARGETS ${TARGET_STEAMAPI} DESTINATION ${CMAKE_INSTALL_LIBDIR}/ddnet COMPONENT client)
|
||||
endif()
|
||||
install(TARGETS game-server DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT server)
|
||||
if(TARGET game-server)
|
||||
install(TARGETS game-server DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT server)
|
||||
endif()
|
||||
if(ANTIBOT)
|
||||
install(TARGETS ${TARGET_ANTIBOT} DESTINATION ${CMAKE_INSTALL_LIBDIR}/ddnet COMPONENT server)
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue