From 73708a6f2a56988ebc63ee43bf2f3ef3c0fad84b Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Fri, 15 May 2020 17:39:25 +0000 Subject: [PATCH] Install openmw-cs.cfg on single-config generators and from the right directory on multi-config --- apps/opencs/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/opencs/CMakeLists.txt b/apps/opencs/CMakeLists.txt index dc9b98596..b20920904 100644 --- a/apps/opencs/CMakeLists.txt +++ b/apps/opencs/CMakeLists.txt @@ -233,8 +233,15 @@ target_link_libraries(openmw-cs Qt5::Widgets Qt5::Core Qt5::Network Qt5::OpenGL) if (WIN32) target_link_libraries(openmw-cs ${Boost_LOCALE_LIBRARY}) INSTALL(TARGETS openmw-cs RUNTIME DESTINATION ".") - INSTALL(FILES "${OpenMW_BINARY_DIR}/Debug/openmw-cs.cfg" DESTINATION "." CONFIGURATIONS Debug) - INSTALL(FILES "${OpenMW_BINARY_DIR}/Release/openmw-cs.cfg" DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel) + + get_generator_is_multi_config(multi_config) + if (multi_config) + SET(INSTALL_SOURCE "${OpenMW_BINARY_DIR}/$") + else () + SET(INSTALL_SOURCE "${OpenMW_BINARY_DIR}") + endif () + + INSTALL(FILES "${INSTALL_SOURCE}/openmw-cs.cfg" DESTINATION ".") endif() if (MSVC)