From 5398cbcdedc08dd0c61c1dfd56e69b74b5398e77 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Tue, 14 Mar 2017 13:33:31 +0300 Subject: [PATCH] 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) --- cmake/AddEventLibrary.cmake | 1 + 1 file changed, 1 insertion(+) 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" -- 2.40.0