cmake: use APPEND during exporting targets (for old cmake)

On centos with cmake 2.8.12.2:
  CMake Error at cmake/AddEventLibrary.cmake:92 (export):
    export called with target "event_extra_shared" which requires target
    "event_core_shared" that is not in the export list.

    If the required target is not easy to reference in this call, consider
    using the APPEND option with multiple separate calls.

But on newer cmake I guess everything is ok.

Fixes: 7182c2f561570cd9ceb704623ebe9ae3608c7b43 ("cmake: build SHARED
and STATIC libraries (like autoconf does)")

(cherry picked from commit b1e8a4138f0da3c8a4bc303ff72b620b41c066d6)
This commit is contained in:
Azat Khuzhin 2017-03-14 13:33:31 +03:00 committed by Azat Khuzhin
parent ebd12e6de7
commit 5398cbcded
No known key found for this signature in database
GPG Key ID: B86086848EF8686D

View File

@ -91,6 +91,7 @@ macro(add_event_library LIB_NAME)
export(TARGETS "${LIB_NAME}_static" "${LIB_NAME}_shared" export(TARGETS "${LIB_NAME}_static" "${LIB_NAME}_shared"
FILE "${PROJECT_BINARY_DIR}/LibeventTargets.cmake" FILE "${PROJECT_BINARY_DIR}/LibeventTargets.cmake"
APPEND
) )
install(TARGETS "${LIB_NAME}_static" "${LIB_NAME}_shared" install(TARGETS "${LIB_NAME}_static" "${LIB_NAME}_shared"