Browse Source

Add libraries to link to merge_libs

master
Gavin Howard 4 years ago
parent
commit
ca41760119
Signed by: gavin GPG Key ID: C08038BDF280D33E
  1. 8
      functions.cmake

8
functions.cmake

@ -78,9 +78,8 @@ endfunction(merge_lib)
# libs into a single static library
function(merge_libs outlib)
# Get the names of all libraries.
set(libs ${ARGV})
list(REMOVE_AT libs 0)
# Get the names of all libraries to link.
set(link_libs ${ARGN})
# Create a dummy file that the target will depend on
set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/${outlib}_dummy.c)
@ -226,6 +225,9 @@ function(merge_libs outlib)
endif()
# Link the needed libraries.
target_link_libraries("${outlib}" "${link_libs}")
# Install the resulting library.
install(TARGETS "${outlib}" ARCHIVE DESTINATION lib/)

Loading…
Cancel
Save