byproduct

This commit is contained in:
Andrei Astafev 2021-08-02 14:33:04 +03:00
parent aea565decf
commit 3bf9e8f148
2 changed files with 7 additions and 3 deletions

View File

@ -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}
<SOURCE_DIR>)
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)

View File

@ -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}
<SOURCE_DIR>)
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)