darling-libxslt/CMakeLists.txt

80 lines
2.3 KiB
CMake
Raw Permalink Normal View History

2015-11-13 17:35:16 +01:00
project(libxslt)
2023-07-26 10:39:11 -07:00
cmake_minimum_required(VERSION 3.13)
2015-11-13 17:35:16 +01:00
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
2020-07-02 21:51:33 -04:00
add_definitions(
-DHAVE_CONFIG_H
-D_REENTRANT
)
2015-11-13 17:35:16 +01:00
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc -D__DARWIN_UNIX03 -fPIC -w")
2020-07-02 21:51:33 -04:00
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/libxslt
"${CMAKE_CURRENT_SOURCE_DIR}/Pregenerated Files/include"
2023-02-05 19:50:54 -08:00
"${CMAKE_CURRENT_SOURCE_DIR}/Pregenerated Files/include/libexslt"
2020-07-02 21:51:33 -04:00
)
2015-11-13 17:35:16 +01:00
set(xslt_SRCS
2020-07-02 21:51:33 -04:00
libxslt/libxslt/attributes.c
libxslt/libxslt/attrvt.c
libxslt/libxslt/documents.c
libxslt/libxslt/extensions.c
libxslt/libxslt/extra.c
libxslt/libxslt/functions.c
libxslt/libxslt/imports.c
libxslt/libxslt/keys.c
libxslt/libxslt/namespaces.c
libxslt/libxslt/numbers.c
libxslt/libxslt/pattern.c
libxslt/libxslt/preproc.c
libxslt/libxslt/security.c
libxslt/libxslt/templates.c
libxslt/libxslt/transform.c
libxslt/libxslt/variables.c
libxslt/libxslt/xslt.c
libxslt/libxslt/xsltlocale.c
libxslt/libxslt/xsltutils.c
2015-11-13 17:35:16 +01:00
)
set(exslt_SRCS
2020-07-02 21:51:33 -04:00
libxslt/libexslt/common.c
libxslt/libexslt/crypto.c
libxslt/libexslt/date.c
libxslt/libexslt/dynamic.c
libxslt/libexslt/exslt.c
libxslt/libexslt/functions.c
libxslt/libexslt/math.c
libxslt/libexslt/saxon.c
libxslt/libexslt/sets.c
libxslt/libexslt/strings.c
2015-11-13 17:35:16 +01:00
)
2017-01-17 17:21:39 +01:00
set(DYLIB_INSTALL_NAME "/usr/lib/libxslt.1.dylib")
set(DYLIB_COMPAT_VERSION "3.0.0")
2020-07-02 21:51:33 -04:00
set(DYLIB_CURRENT_VERSION "3.26.0")
2017-01-17 17:21:39 +01:00
add_darling_library(xslt SHARED ${xslt_SRCS})
2017-01-28 00:21:57 +01:00
make_fat(xslt)
2015-11-13 17:35:16 +01:00
target_link_libraries(xslt system xml2)
2017-01-17 17:21:39 +01:00
set_target_properties(xslt PROPERTIES OUTPUT_NAME "xslt.1")
InstallSymlink("libxslt.1.dylib" "${CMAKE_INSTALL_PREFIX}/libexec/darling/usr/lib/libxslt.dylib")
2015-11-13 17:35:16 +01:00
2017-01-17 17:21:39 +01:00
set(DYLIB_INSTALL_NAME "/usr/lib/libexslt.0.dylib")
2018-05-18 20:19:54 -04:00
set(DYLIB_COMPAT_VERSION "9.0.0")
set(DYLIB_CURRNT_VERSION "9.15.0")
2017-01-17 17:21:39 +01:00
add_darling_library(exslt SHARED ${exslt_SRCS})
2017-01-28 00:21:57 +01:00
make_fat(exslt)
2018-05-18 20:19:54 -04:00
2015-11-13 17:35:16 +01:00
target_link_libraries(exslt system xslt)
2017-01-17 17:21:39 +01:00
set_target_properties(exslt PROPERTIES OUTPUT_NAME "exslt.0")
InstallSymlink("libexslt.0.dylib" "${CMAKE_INSTALL_PREFIX}/libexec/darling/usr/lib/libexslt.dylib")
2015-11-13 17:35:16 +01:00
2017-01-17 17:21:39 +01:00
install(TARGETS xslt exslt DESTINATION libexec/darling/usr/lib)
2015-11-13 17:35:16 +01:00
2020-09-17 08:42:05 -04:00
install(FILES libxslt/doc/xsltproc.1 DESTINATION libexec/darling/usr/share/man/man1)
install(FILES libxslt/libexslt/libexslt.3 libxslt/libxslt/libxslt.3 DESTINATION libexec/darling/usr/share/man/man3)