From: Azat Khuzhin Date: Tue, 14 Mar 2017 10:33:31 +0000 (+0300) Subject: cmake: use APPEND during exporting targets (for old cmake) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b1e8a4138f0da3c8a4bc303ff72b620b41c066d6;p=libevent 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)") --- diff --git a/cmake/AddEventLibrary.cmake b/cmake/AddEventLibrary.cmake index 23a8d4ca..8475e086 100644 --- a/cmake/AddEventLibrary.cmake +++ b/cmake/AddEventLibrary.cmake @@ -91,6 +91,7 @@ macro(add_event_library LIB_NAME) export(TARGETS "${LIB_NAME}_static" "${LIB_NAME}_shared" FILE "${PROJECT_BINARY_DIR}/LibeventTargets.cmake" + APPEND ) install(TARGETS "${LIB_NAME}_static" "${LIB_NAME}_shared"