diff options
author | redfish <redfish@galactica.pw> | 2016-08-29 10:58:52 -0400 |
---|---|---|
committer | redfish <redfish@galactica.pw> | 2016-08-30 23:01:48 -0400 |
commit | 1de812a92a1f0b6c9080044e04cb77bc34a2ebe7 (patch) | |
tree | d5ff927722082869d1a8112ada836e7b7cff4ae4 /src/wallet/CMakeLists.txt | |
parent | cmake: comply with the new policy CMP0026 (diff) | |
download | monero-1de812a92a1f0b6c9080044e04cb77bc34a2ebe7.tar.xz |
cmake: merge libs via virtual object libraries
CMake issued a warming about policy CMP0026: access of LOCATION
target property at config time was disallowed. Offending code
was the code that merged static libraries to generate
libwallet_merged.a.
This patch does that same merge task in a much simpler way. And,
since it doesn't violate the policy, the warning went away.
Diffstat (limited to '')
-rw-r--r-- | src/wallet/CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt index c4585f9ee..48e4b0a23 100644 --- a/src/wallet/CMakeLists.txt +++ b/src/wallet/CMakeLists.txt @@ -27,7 +27,6 @@ # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # include (${PROJECT_SOURCE_DIR}/cmake/libutils.cmake) -include (${PROJECT_SOURCE_DIR}/cmake/MergeStaticLibs.cmake) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) @@ -76,7 +75,11 @@ target_link_libraries(wallet ${EXTRA_LIBRARIES}) set(libs_to_merge wallet cryptonote_core mnemonics common crypto) -merge_static_libs(wallet_merged "${libs_to_merge}") + +foreach(lib ${libs_to_merge}) + list(APPEND objlibs $<TARGET_OBJECTS:obj_${lib}>) # matches naming convention in src/CMakeLists.txtA +endforeach() +add_library(wallet_merged STATIC ${objlibs}) install(TARGETS wallet_merged ARCHIVE DESTINATION lib) |