Browse Source

Try to make list show up

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

20
functions.cmake

@ -40,7 +40,7 @@
# Make sure we save this.
set(SCRIPT_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE STRING "Directory of the merge script")
set(MERGE_LIBS "" CACHE STRING "List of libraries to merge")
set(MERGE_LIBS "${MERGE_LIBS}" CACHE INTERNAL STRING "List of libraries to merge")
# For some reason, we get stupid CMake warnings.
cmake_policy(SET CMP0026 NEW)
@ -59,6 +59,14 @@ function(static_lib_path var lib_output_name)
endfunction(static_lib_path)
function(merge_lib name output)
static_lib_path(LIB_PATH "${output}")
list(APPEND MERGE_LIBS "${LIB_PATH}")
message(STATUS "List: ${MERGE_LIBS}")
endfunction(merge_lib)
# Merge_static_libs(outlib lib1 lib2 ... libn) merges a number of static
# libs into a single static library
function(merge_static_libs outlib)
@ -100,9 +108,6 @@ function(merge_static_libs outlib)
endif()
# Rename.
set(libfiles "${MERGE_LIBS}")
# Just to be sure: cleanup from duplicates
list(REMOVE_DUPLICATES MERGE_LIBS)
@ -201,13 +206,6 @@ function(merge_static_libs outlib)
endfunction()
function(merge_lib name output)
static_lib_path(LIB_PATH "${output}")
list(APPEND MERGE_LIBS "${LIB_PATH}")
endfunction(merge_lib)
function(create_test target)
add_executable("${target}" "${target}.c")

Loading…
Cancel
Save