diff options
Diffstat (limited to 'cmake/libutils.cmake')
-rw-r--r-- | cmake/libutils.cmake | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake index 2e65e8b5ba3..67b14b72828 100644 --- a/cmake/libutils.cmake +++ b/cmake/libutils.cmake @@ -57,14 +57,14 @@ IF(WIN32 OR CYGWIN OR APPLE OR WITH_PIC OR DISABLE_SHARED OR NOT CMAKE_SHARED_LI SET(_SKIP_PIC 1) ENDIF() -INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/cmake_parse_arguments.cmake) -# CREATE_EXPORT_FILE (VAR target api_functions) +INCLUDE(CMakeParseArguments) +# CREATE_EXPORTS_FILE (VAR target api_functions) # Internal macro, used to create source file for shared libraries that # otherwise consists entirely of "convenience" libraries. On Windows, # also exports API functions as dllexport. On unix, creates a dummy file # that references all exports and this prevents linker from creating an # empty library(there are unportable alternatives, --whole-archive) -MACRO(CREATE_EXPORT_FILE VAR TARGET API_FUNCTIONS) +MACRO(CREATE_EXPORTS_FILE VAR TARGET API_FUNCTIONS) IF(WIN32) SET(DUMMY ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_dummy.c) SET(EXPORTS ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_exports.def) @@ -218,13 +218,14 @@ ENDMACRO() # [OUTPUT_NAME output_name] #) MACRO(MERGE_LIBRARIES) - MYSQL_PARSE_ARGUMENTS(ARG - "EXPORTS;OUTPUT_NAME;COMPONENT;VERSION;SOVERSION" + CMAKE_PARSE_ARGUMENTS(ARG "STATIC;SHARED;MODULE;NOINSTALL" + "OUTPUT_NAME;COMPONENT;VERSION;SOVERSION" + "EXPORTS" ${ARGN} ) - LIST(GET ARG_DEFAULT_ARGS 0 TARGET) - SET(LIBS ${ARG_DEFAULT_ARGS}) + LIST(GET ARG_UNPARSED_ARGUMENTS 0 TARGET) + SET(LIBS ${ARG_UNPARSED_ARGUMENTS}) LIST(REMOVE_AT LIBS 0) IF(ARG_STATIC) IF (NOT ARG_OUTPUT_NAME) @@ -254,7 +255,7 @@ MACRO(MERGE_LIBRARIES) ENDIF() ENDFOREACH() ENDIF() - CREATE_EXPORT_FILE(SRC ${TARGET} "${ARG_EXPORTS}") + CREATE_EXPORTS_FILE(SRC ${TARGET} "${ARG_EXPORTS}") IF(NOT ARG_NOINSTALL) ADD_VERSION_INFO(${TARGET} SHARED SRC) ENDIF() |