Add versioner cmake func, install /usr/bin/xattr (darlinghq/darling#689)

This commit is contained in:
Lubos Dolezel 2020-02-25 19:05:57 +01:00
parent eaf5cfc5d6
commit c3ebd26366
4 changed files with 25 additions and 3 deletions

22
cmake/versioner.cmake Normal file
View File

@ -0,0 +1,22 @@
function(versioner project versions default_version)
set(PROJECT ${project})
string(TOUPPER ${project} UPROJECT)
set(DEFAULTVERSION ${default_version})
set(VERSIONS "")
list(LENGTH versions NVERSIONS)
foreach(version IN LISTS versions)
set(VERSIONS "${VERSIONS} \"${version}\",")
endforeach(version)
configure_file(${CMAKE_SOURCE_DIR}/src/external/perl/versioner/versions.h.in ${CMAKE_CURRENT_BINARY_DIR}/versions.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_definitions(-std=c99)
add_darling_executable(${project} ${CMAKE_SOURCE_DIR}/src/external/perl/versioner/versioner.c)
target_link_libraries(${project} CoreFoundation)
install(TARGETS ${project} DESTINATION libexec/darling/usr/bin)
endfunction(versioner)

2
src/external/perl vendored

@ -1 +1 @@
Subproject commit 0d297a4762e9f5bb30bf82820d6bf741e921eb27
Subproject commit e571a007a8664159f4c949c10ee4bb0ef3b96f4d

2
src/external/python vendored

@ -1 +1 @@
Subproject commit a16b72d01eda77e5a9004ea67c7c793977b3367f
Subproject commit 0c7e7a4f59eb84eb706c12bd2f97dc7b5250e22d

@ -1 +1 @@
Subproject commit c722c8cf771944ed8279bd3e55c3b620efcc5146
Subproject commit 827cca371a128954281d80c720b3d852f0146f36