cmake: add_complex_library add EXPORT parameter

EXPORT is an optional parameter. If set the module is also
marked for export.
This commit is contained in:
Bernhard Miklautz 2014-04-22 17:05:42 +02:00
parent 5ec5ef078c
commit 67cf5bdf39

View File

@ -67,7 +67,7 @@ macro(add_complex_library)
set(PREFIX "COMPLEX_LIBRARY")
cmake_parse_arguments(${PREFIX}
""
"EXPORT"
"MODULE;TYPE;MONOLITHIC"
"SOURCES"
${ARGN})
@ -77,6 +77,10 @@ macro(add_complex_library)
else()
add_library(${${PREFIX}_MODULE} ${${PREFIX}_SOURCES})
endif()
if (${PREFIX}_EXPORT)
message("exporting ${${PREFIX}_MODULE}")
export_complex_library(LIBNAME ${${PREFIX}_MODULE})
endif()
endmacro(add_complex_library)