From 3bf9e8f14819a13149b31dc39a50a9231a8ec63c Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Mon, 2 Aug 2021 14:33:04 +0300 Subject: [PATCH] byproduct --- FindMyxNotificationsThirdparty.cmake | 4 +++- FindMyxlibThirdparty.cmake | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/FindMyxNotificationsThirdparty.cmake b/FindMyxNotificationsThirdparty.cmake index 56f936b..729240a 100644 --- a/FindMyxNotificationsThirdparty.cmake +++ b/FindMyxNotificationsThirdparty.cmake @@ -6,13 +6,15 @@ list(APPEND _ext_project_args myx-notifications SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/myx-notifications INSTALL_DIR ${CMAKE_BINARY_DIR} - BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-notifications.a CMAKE_ARGS ${CMLIB_EXT_PROJ_DEFAULT_ARGS} ) if(MyxNotificationsThirdparty_FIND_COMPONENTS STREQUAL "headers") list(APPEND _ext_project_args BUILD_COMMAND true INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} myx-notifications-install-headers) +else() + list(APPEND _ext_project_args + BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-notifications.a) endif() ExternalProject_Add(${_ext_project_args}) unset(_ext_project_args) diff --git a/FindMyxlibThirdparty.cmake b/FindMyxlibThirdparty.cmake index 581628f..6c9866c 100644 --- a/FindMyxlibThirdparty.cmake +++ b/FindMyxlibThirdparty.cmake @@ -6,14 +6,16 @@ list(APPEND _ext_project_args myxlib SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/myxlib INSTALL_DIR ${CMAKE_BINARY_DIR} - BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-qt.a - ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-filesystem.a CMAKE_ARGS ${CMLIB_EXT_PROJ_DEFAULT_ARGS} ) if(MyxlibThirdparty_FIND_COMPONENTS STREQUAL "headers") list(APPEND _ext_project_args BUILD_COMMAND true INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} myxlib-install-headers) +else() + list(APPEND _ext_project_args + BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-qt.a + ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-filesystem.a) endif() ExternalProject_Add(${_ext_project_args}) unset(_ext_project_args)