Files
swift-mirror/stdlib/private/Glibc/CMakeLists.txt
Dmitri Hrybenko 350248dae5 Reorganize the directory structure under 'stdlib'
The standard library has grown significantly, and we need a new
directory structure that clearly reflects the role of the APIs, and
allows future growth.

See stdlib/{public,internal,private}/README.txt for more information.

Swift SVN r25876
2015-03-09 05:26:05 +00:00

35 lines
1002 B
CMake

set(sources
module.map
)
set(output_dir "${SWIFTLIB_DIR}/glibc")
set(commands
COMMAND ${CMAKE_COMMAND} "-E" "make_directory" "${output_dir}")
set(outputs)
foreach(input ${sources})
list(APPEND commands
COMMAND
"${CMAKE_COMMAND}" "-E" "copy_if_different"
"${CMAKE_CURRENT_SOURCE_DIR}/${input}"
"${output_dir}/${input}")
list(APPEND outputs "${output_dir}/${input}")
endforeach()
# Put the output dir itself last so that it isn't considered the primary output.
list(APPEND outputs "${output_dir}")
add_custom_command_target(unused_var
${commands}
CUSTOM_TARGET_NAME "copy_glibc_module"
OUTPUT "${outputs}"
DEPENDS "${sources}"
COMMENT "Copying Glibc module to ${output_dir}")
swift_install_in_component(stdlib-experimental
FILES ${sources}
DESTINATION "lib/swift/glibc")
add_swift_library(swiftGlibc IS_SDK_OVERLAY
Glibc.swift
FILE_DEPENDS copy_glibc_module "${SWIFTLIB_DIR}/glibc"
INSTALL_IN_COMPONENT stdlib-experimental)