mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-08-07 10:42:55 +03:00
Add CMake build files
This commit is contained in:
committed by
Nick Wellnhofer
parent
0141e19eef
commit
d51dda321b
520
CMakeLists.txt
Normal file
520
CMakeLists.txt
Normal file
@@ -0,0 +1,520 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.12)
|
||||||
|
|
||||||
|
project(libxslt1)
|
||||||
|
|
||||||
|
include(CheckCSourceCompiles)
|
||||||
|
include(CheckFunctionExists)
|
||||||
|
include(CheckIncludeFiles)
|
||||||
|
include(CheckLibraryExists)
|
||||||
|
include(CMakePackageConfigHelpers)
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
set(LIBEXSLT_MAJOR_VERSION 0)
|
||||||
|
set(LIBEXSLT_MINOR_VERSION 8)
|
||||||
|
set(LIBEXSLT_MICRO_VERSION 20)
|
||||||
|
|
||||||
|
set(LIBEXSLT_DOTTED_VERSION ${LIBEXSLT_MAJOR_VERSION}.${LIBEXSLT_MINOR_VERSION}.${LIBEXSLT_MICRO_VERSION})
|
||||||
|
math(EXPR LIBEXSLT_VERSION_NUMBER "${LIBEXSLT_MAJOR_VERSION} * 10000 + ${LIBEXSLT_MINOR_VERSION} * 100 + ${LIBEXSLT_MICRO_VERSION}")
|
||||||
|
set(LIBEXSLT_VERSION_EXTRA "")
|
||||||
|
|
||||||
|
set(LIBXSLT_MAJOR_VERSION 1)
|
||||||
|
set(LIBXSLT_MINOR_VERSION 1)
|
||||||
|
set(LIBXSLT_MICRO_VERSION 34)
|
||||||
|
|
||||||
|
set(LIBXSLT_DOTTED_VERSION "${LIBXSLT_MAJOR_VERSION}.${LIBXSLT_MINOR_VERSION}.${LIBXSLT_MICRO_VERSION}")
|
||||||
|
math(EXPR LIBXSLT_VERSION_NUMBER "${LIBXSLT_MAJOR_VERSION} * 10000 + ${LIBXSLT_MINOR_VERSION} * 100 + ${LIBXSLT_MICRO_VERSION}")
|
||||||
|
set(LIBXSLT_VERSION_EXTRA "")
|
||||||
|
|
||||||
|
find_package(Iconv)
|
||||||
|
find_package(LibXml2)
|
||||||
|
find_package(Python2 COMPONENTS Interpreter Development)
|
||||||
|
find_package(Threads)
|
||||||
|
|
||||||
|
check_library_exists(grypt gcry_control "gcrypt.h" HAVE_GCRYPT)
|
||||||
|
|
||||||
|
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||||
|
option(LIBXSLT_WITH_DEBUGGER "Add the debugging support" ON)
|
||||||
|
|
||||||
|
if(HAVE_GCRYPT)
|
||||||
|
option(LIBXSLT_WITH_CRYPTO "Add crypto support to exslt" ON)
|
||||||
|
else()
|
||||||
|
set(LIBXSLT_WITH_CRYPTO OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(LIBXSLT_WITH_MEM_DEBUG "Add the memory debugging module" OFF)
|
||||||
|
option(LIBXSLT_WITH_MODULES "Add the module support" ON)
|
||||||
|
option(LIBXSLT_WITH_PROFILER "Add the profiling support" ON)
|
||||||
|
|
||||||
|
if(Python2_FOUND)
|
||||||
|
option(LIBXSLT_WITH_PYTHON "Build Python bindings" ON)
|
||||||
|
set(LIBXSLT_PYTHON_INSTALL_DIR ${Python2_SITEARCH} CACHE PATH "Python bindings install directory")
|
||||||
|
else()
|
||||||
|
set(LIBXSLT_WITH_PYTHON OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(LIBXSLT_WITH_TRIO OFF)
|
||||||
|
option(LIBXSLT_WITH_XSLT_DEBUG "Add the debugging code" ON)
|
||||||
|
|
||||||
|
foreach(VARIABLE IN ITEMS WITH_CRYPTO WITH_DEBUGGER WITH_MEM_DEBUG WITH_MODULES WITH_PROFILER WITH_PYTHON WITH_TRIO WITH_XSLT_DEBUG)
|
||||||
|
if(LIBXSLT_${VARIABLE})
|
||||||
|
set(${VARIABLE} 1)
|
||||||
|
else()
|
||||||
|
set(${VARIABLE} 0)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
set(MODULE_EXTENSION "${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||||
|
|
||||||
|
if(Threads_FOUND)
|
||||||
|
list(APPEND CMAKE_REQUIRED_LIBRARIES Threads::Threads)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
configure_file(libxslt/win32config.h config.h COPYONLY)
|
||||||
|
configure_file(libxslt/win32config.h win32config.h COPYONLY)
|
||||||
|
else()
|
||||||
|
if(UNIX)
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES m)
|
||||||
|
endif()
|
||||||
|
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
|
||||||
|
check_include_files(dlfcn.h HAVE_DLFCN_H)
|
||||||
|
check_function_exists(fabs HAVE_FABS)
|
||||||
|
check_include_files(float.h HAVE_FLOAT_H)
|
||||||
|
check_function_exists(floor HAVE_FLOOR)
|
||||||
|
check_function_exists(fprintf HAVE_FPRINTF)
|
||||||
|
check_include_files(fp_class.h HAVE_FP_CLASS_H)
|
||||||
|
check_function_exists(ftime HAVE_FTIME)
|
||||||
|
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
|
||||||
|
check_function_exists(gmtime HAVE_GMTIME)
|
||||||
|
check_function_exists(gmtime_r HAVE_GMTIME_R)
|
||||||
|
check_include_files(ieeefp.h HAVE_IEEEFP_H)
|
||||||
|
check_include_files(inttypes.h HAVE_INTTYPES_H)
|
||||||
|
check_library_exists(pthread pthread_join "" HAVE_LIBPTHREAD)
|
||||||
|
check_include_files(locale.h HAVE_LOCALE_H)
|
||||||
|
check_function_exists(localtime HAVE_LOCALTIME)
|
||||||
|
check_function_exists(localtime_r HAVE_LOCALTIME_R)
|
||||||
|
check_include_files(math.h HAVE_MATH_H)
|
||||||
|
check_include_files(memory.h HAVE_MEMORY_H)
|
||||||
|
check_include_files(nan.h HAVE_NAN_H)
|
||||||
|
check_function_exists(pow HAVE_POW)
|
||||||
|
check_function_exists(printf HAVE_PRINTF)
|
||||||
|
check_include_files(pthread.h HAVE_PTHREAD_H)
|
||||||
|
check_function_exists(snprintf HAVE_SNPRINTF)
|
||||||
|
check_function_exists(sprintf HAVE_SPRINTF)
|
||||||
|
check_function_exists(sscanf HAVE_SSCANF)
|
||||||
|
check_function_exists(stat HAVE_STAT)
|
||||||
|
check_include_files(stdarg.h HAVE_STDARG_H)
|
||||||
|
check_include_files(stdint.h HAVE_STDINT_H)
|
||||||
|
check_include_files(stdlib.h HAVE_STDLIB_H)
|
||||||
|
check_include_files(strings.h HAVE_STRINGS_H)
|
||||||
|
check_include_files(string.h HAVE_STRING_H)
|
||||||
|
check_function_exists(strxfrm_l HAVE_STRXFRM_L)
|
||||||
|
check_include_files(sys/select.h HAVE_SYS_SELECT_H)
|
||||||
|
check_include_files(sys/stat.h HAVE_SYS_STAT_H)
|
||||||
|
check_include_files(sys/timeb.h HAVE_SYS_TIMEB_H)
|
||||||
|
check_include_files(sys/time.h HAVE_SYS_TIME_H)
|
||||||
|
check_include_files(sys/types.h HAVE_SYS_TYPES_H)
|
||||||
|
check_function_exists(time HAVE_TIME)
|
||||||
|
check_include_files(time.h HAVE_TIME_H)
|
||||||
|
check_include_files(unistd.h HAVE_UNISTD_H)
|
||||||
|
check_function_exists(vfprintf HAVE_VFPRINTF)
|
||||||
|
check_function_exists(vsnprintf HAVE_VSNPRINTF)
|
||||||
|
check_function_exists(vsprintf HAVE_VSPRINTF)
|
||||||
|
check_include_files(xlocale.h HAVE_XLOCALE_H)
|
||||||
|
check_function_exists(_stat HAVE__STAT)
|
||||||
|
#LT_OBJDIR
|
||||||
|
set(PACKAGE "libxslt")
|
||||||
|
set(PACKAGE_BUGREPORT "xml@gnome.org")
|
||||||
|
set(PACKAGE_NAME "libxslt")
|
||||||
|
set(PACKAGE_STRING "libxslt ${LIBXSLT_DOTTED_VERSION}")
|
||||||
|
set(PACKAGE_TARNAME "libxslt")
|
||||||
|
set(PACKAGE_URL "http://www.xmlsoft.org/libxslt")
|
||||||
|
set(PACKAGE_VERSION ${LIBXSLT_DOTTED_VERSION})
|
||||||
|
check_include_files("assert.h;ctype.h;errno.h;float.h;limits.h;locale.h;math.h;setjmp.h;signal.h;stdarg.h;stddef.h;stdio.h;stdlib.h;string.h;time.h" STDC_HEADERS)
|
||||||
|
set(_ALL_SOURCE ON)
|
||||||
|
set(_GNU_SOURCE ON)
|
||||||
|
set(_POSIX_PTHREAD_SEMANTICS ON)
|
||||||
|
set(_TANDEM_SOURCE ON)
|
||||||
|
check_c_source_compiles("
|
||||||
|
#define __EXTENSIONS__ 1
|
||||||
|
int main() { return 0; }
|
||||||
|
" __EXTENSIONS__)
|
||||||
|
check_include_files(minix/config.h HAVE_MINIX_CONFIG_H)
|
||||||
|
if(HAVE_MINIX_CONFIG_H)
|
||||||
|
set(_MINIX ON)
|
||||||
|
set(_POSIX_1_SOURCE ON)
|
||||||
|
set(_POSIX_SOURCE ON)
|
||||||
|
endif()
|
||||||
|
if(WIN32)
|
||||||
|
add_definitions(-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x501)
|
||||||
|
set(_WINSOCKAPI_ 1)
|
||||||
|
endif()
|
||||||
|
#snprintf
|
||||||
|
#vsnprintf
|
||||||
|
configure_file(config.h.cmake.in config.h)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(VERSION ${LIBEXSLT_DOTTED_VERSION})
|
||||||
|
configure_file(libexslt/exsltconfig.h.in libexslt/exsltconfig.h)
|
||||||
|
set(VERSION ${LIBXSLT_DOTTED_VERSION})
|
||||||
|
configure_file(libxslt/xsltconfig.h.in libxslt/xsltconfig.h)
|
||||||
|
|
||||||
|
set(
|
||||||
|
LIBXSLT_HDRS
|
||||||
|
libxslt/attributes.h
|
||||||
|
libxslt/documents.h
|
||||||
|
libxslt/extensions.h
|
||||||
|
libxslt/extra.h
|
||||||
|
libxslt/functions.h
|
||||||
|
libxslt/imports.h
|
||||||
|
libxslt/keys.h
|
||||||
|
libxslt/namespaces.h
|
||||||
|
libxslt/numbersInternals.h
|
||||||
|
libxslt/pattern.h
|
||||||
|
libxslt/preproc.h
|
||||||
|
libxslt/security.h
|
||||||
|
libxslt/templates.h
|
||||||
|
libxslt/transform.h
|
||||||
|
libxslt/variables.h
|
||||||
|
libxslt/xslt.h
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/libxslt/xsltconfig.h
|
||||||
|
libxslt/xsltexports.h
|
||||||
|
libxslt/xsltInternals.h
|
||||||
|
libxslt/xsltlocale.h
|
||||||
|
libxslt/xsltutils.h
|
||||||
|
)
|
||||||
|
|
||||||
|
set(
|
||||||
|
LIBXSLT_SRCS
|
||||||
|
libxslt/attributes.c
|
||||||
|
libxslt/attrvt.c
|
||||||
|
libxslt/documents.c
|
||||||
|
libxslt/extensions.c
|
||||||
|
libxslt/extra.c
|
||||||
|
libxslt/functions.c
|
||||||
|
libxslt/imports.c
|
||||||
|
libxslt/keys.c
|
||||||
|
libxslt/namespaces.c
|
||||||
|
libxslt/numbers.c
|
||||||
|
libxslt/pattern.c
|
||||||
|
libxslt/preproc.c
|
||||||
|
libxslt/security.c
|
||||||
|
libxslt/templates.c
|
||||||
|
libxslt/transform.c
|
||||||
|
libxslt/variables.c
|
||||||
|
libxslt/xslt.c
|
||||||
|
libxslt/xsltlocale.c
|
||||||
|
libxslt/xsltutils.c
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(LibXslt ${LIBXSLT_HDRS} ${LIBXSLT_SRCS})
|
||||||
|
|
||||||
|
target_include_directories(
|
||||||
|
LibXslt
|
||||||
|
PUBLIC
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||||
|
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>
|
||||||
|
)
|
||||||
|
|
||||||
|
if(LIBXSLT_WITH_CRYPTO)
|
||||||
|
target_link_libraries(LibXslt PRIVATE gcrypt)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(Iconv_FOUND)
|
||||||
|
target_link_libraries(LibXslt PUBLIC Iconv::Iconv)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(LibXslt PUBLIC LibXml2::LibXml2)
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
target_link_libraries(LibXslt PRIVATE m)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(Threads_FOUND)
|
||||||
|
target_link_libraries(LibXslt PRIVATE Threads::Threads)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set_target_properties(
|
||||||
|
LibXslt
|
||||||
|
PROPERTIES
|
||||||
|
IMPORT_PREFIX lib
|
||||||
|
OUTPUT_NAME xslt
|
||||||
|
POSITION_INDEPENDENT_CODE ON
|
||||||
|
PREFIX lib
|
||||||
|
VERSION ${VERSION}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
if(BUILD_SHARED_LIBS)
|
||||||
|
set_target_properties(
|
||||||
|
LibXslt
|
||||||
|
PROPERTIES
|
||||||
|
DEBUG_POSTFIX d
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set_target_properties(
|
||||||
|
LibXslt
|
||||||
|
PROPERTIES
|
||||||
|
DEBUG_POSTFIX sd
|
||||||
|
MINSIZEREL_POSTFIX s
|
||||||
|
RELEASE_POSTFIX s
|
||||||
|
RELWITHDEBINFO_POSTFIX s
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(FILES ${LIBXSLT_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libxslt COMPONENT development)
|
||||||
|
|
||||||
|
install(
|
||||||
|
TARGETS LibXslt
|
||||||
|
EXPORT LibXslt
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT development
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime NAMELINK_SKIP
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||||
|
)
|
||||||
|
|
||||||
|
if(BUILD_SHARED_LIBS)
|
||||||
|
install(
|
||||||
|
TARGETS LibXslt
|
||||||
|
EXPORT LibXslt
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT development NAMELINK_ONLY
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
|
install(FILES $<TARGET_PDB_FILE:LibXslt> DESTINATION ${CMAKE_INSTALL_BINDIR} CONFIGURATIONS Debug RelWithDebInfo COMPONENT debug)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(
|
||||||
|
LIBEXSLT_HDRS
|
||||||
|
libexslt/exslt.h
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/libexslt/exsltconfig.h
|
||||||
|
libexslt/exsltexports.h
|
||||||
|
)
|
||||||
|
|
||||||
|
set(
|
||||||
|
LIBEXSLT_SRCS
|
||||||
|
libexslt/common.c
|
||||||
|
libexslt/crypto.c
|
||||||
|
libexslt/date.c
|
||||||
|
libexslt/dynamic.c
|
||||||
|
libexslt/exslt.c
|
||||||
|
libexslt/functions.c
|
||||||
|
libexslt/libexslt.h
|
||||||
|
libexslt/math.c
|
||||||
|
libexslt/saxon.c
|
||||||
|
libexslt/sets.c
|
||||||
|
libexslt/strings.c
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(LibExslt ${LIBEXSLT_HDRS} ${LIBEXSLT_SRCS})
|
||||||
|
|
||||||
|
target_include_directories(
|
||||||
|
LibExslt
|
||||||
|
PUBLIC
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||||
|
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>
|
||||||
|
)
|
||||||
|
|
||||||
|
if(LIBXSLT_WITH_GCRYPT)
|
||||||
|
target_link_libraries(LibExslt PRIVATE gcrypt)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(LibExslt PUBLIC LibXslt LibXml2::LibXml2)
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
target_link_libraries(LibExslt PRIVATE m)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(Threads_FOUND)
|
||||||
|
target_link_libraries(LibExslt PRIVATE Threads::Threads)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set_target_properties(
|
||||||
|
LibExslt
|
||||||
|
PROPERTIES
|
||||||
|
IMPORT_PREFIX lib
|
||||||
|
OUTPUT_NAME exslt
|
||||||
|
POSITION_INDEPENDENT_CODE ON
|
||||||
|
PREFIX lib
|
||||||
|
VERSION ${VERSION}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
if(BUILD_SHARED_LIBS)
|
||||||
|
set_target_properties(
|
||||||
|
LibExslt
|
||||||
|
PROPERTIES
|
||||||
|
DEBUG_POSTFIX d
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set_target_properties(
|
||||||
|
LibExslt
|
||||||
|
PROPERTIES
|
||||||
|
DEBUG_POSTFIX sd
|
||||||
|
MINSIZEREL_POSTFIX s
|
||||||
|
RELEASE_POSTFIX s
|
||||||
|
RELWITHDEBINFO_POSTFIX s
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(FILES ${LIBEXSLT_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libexslt COMPONENT development)
|
||||||
|
|
||||||
|
install(
|
||||||
|
TARGETS LibExslt
|
||||||
|
EXPORT LibXslt
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT development
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime NAMELINK_SKIP
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||||
|
)
|
||||||
|
|
||||||
|
if(BUILD_SHARED_LIBS)
|
||||||
|
install(
|
||||||
|
TARGETS LibExslt
|
||||||
|
EXPORT LibXslt
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT development NAMELINK_ONLY
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
|
install(FILES $<TARGET_PDB_FILE:LibExslt> DESTINATION ${CMAKE_INSTALL_BINDIR} CONFIGURATIONS Debug RelWithDebInfo COMPONENT debug)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_executable(xsltproc xsltproc/xsltproc.c)
|
||||||
|
target_include_directories(xsltproc PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
||||||
|
target_link_libraries(xsltproc LibExslt LibXslt)
|
||||||
|
install(TARGETS xsltproc RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT programs)
|
||||||
|
|
||||||
|
if(LIBXSLT_WITH_PYTHON)
|
||||||
|
set(ENV{SRCDIR} ${CMAKE_CURRENT_SOURCE_DIR}/python)
|
||||||
|
execute_process(
|
||||||
|
COMMAND
|
||||||
|
${Python2_EXECUTABLE}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/python/generator.py
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/doc/libxslt-api.xml
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/python/libxslt-python-api.xml
|
||||||
|
)
|
||||||
|
unset(ENV{SRCDIR})
|
||||||
|
file(READ python/libxsl.py LIBXSL_PY)
|
||||||
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/libxslt.py.in "${LIBXSL_PY}")
|
||||||
|
file(READ ${CMAKE_CURRENT_BINARY_DIR}/libxsltclass.py LIBXSLTCLASS_PY)
|
||||||
|
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libxslt.py.in "${LIBXSLTCLASS_PY}")
|
||||||
|
configure_file(${CMAKE_CURRENT_BINARY_DIR}/libxslt.py.in libxslt.py COPYONLY)
|
||||||
|
add_library(
|
||||||
|
LibXsltMod
|
||||||
|
libxslt-py.c
|
||||||
|
libxslt-py.h
|
||||||
|
python/libxml_wrap.h
|
||||||
|
python/libxslt.c
|
||||||
|
python/libxslt_wrap.h
|
||||||
|
python/types.c
|
||||||
|
)
|
||||||
|
target_include_directories(
|
||||||
|
LibXsltMod
|
||||||
|
PUBLIC
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/python>
|
||||||
|
)
|
||||||
|
target_link_libraries(LibXsltMod LibXslt LibExslt Python2::Python)
|
||||||
|
set_target_properties(
|
||||||
|
LibXsltMod
|
||||||
|
PROPERTIES
|
||||||
|
IMPORT_PREFIX lib
|
||||||
|
OUTPUT_NAME xsltmod
|
||||||
|
PREFIX lib
|
||||||
|
VERSION ${VERSION}
|
||||||
|
)
|
||||||
|
install(
|
||||||
|
TARGETS LibXsltMod
|
||||||
|
ARCHIVE DESTINATION ${LIBXSLT_PYTHON_INSTALL_DIR} COMPONENT development
|
||||||
|
LIBRARY DESTINATION ${LIBXSLT_PYTHON_INSTALL_DIR} COMPONENT runtime NAMELINK_SKIP
|
||||||
|
RUNTIME DESTINATION ${LIBXSLT_PYTHON_INSTALL_DIR} COMPONENT runtime
|
||||||
|
)
|
||||||
|
if(BUILD_SHARED_LIBS)
|
||||||
|
install(
|
||||||
|
TARGETS LibXsltMod
|
||||||
|
LIBRARY DESTINATION ${LIBXSLT_PYTHON_INSTALL_DIR} COMPONENT development NAMELINK_ONLY
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
|
install(FILES $<TARGET_PDB_FILE:LibXsltMod> DESTINATION ${LIBXSLT_PYTHON_INSTALL_DIR} CONFIGURATIONS Debug RelWithDebInfo COMPONENT debug)
|
||||||
|
endif()
|
||||||
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libxslt.py DESTINATION ${LIBXSLT_PYTHON_INSTALL_DIR} COMPONENT runtime)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(FILES libexslt/libexslt.3 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3 COMPONENT documentation)
|
||||||
|
install(FILES libxslt/libxslt.3 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3 COMPONENT documentation)
|
||||||
|
install(FILES doc/xsltproc.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT documentation)
|
||||||
|
install(DIRECTORY doc/ DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/libxslt COMPONENT documentation PATTERN Makefile.* EXCLUDE)
|
||||||
|
|
||||||
|
configure_package_config_file(
|
||||||
|
libxslt-config.cmake.in libxslt-config.cmake
|
||||||
|
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxslt-${VERSION}
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/libxslt-config.cmake
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxslt-${VERSION}
|
||||||
|
COMPONENT development
|
||||||
|
)
|
||||||
|
|
||||||
|
write_basic_package_version_file(
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/libxslt-config-version.cmake
|
||||||
|
VERSION ${VERSION}
|
||||||
|
COMPATIBILITY ExactVersion
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/libxslt-config-version.cmake
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxslt-${VERSION}
|
||||||
|
COMPONENT development
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
EXPORT LibXslt
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxslt-${VERSION}
|
||||||
|
NAMESPACE LibXslt::
|
||||||
|
FILE libxslt-export.cmake
|
||||||
|
COMPONENT development
|
||||||
|
)
|
||||||
|
|
||||||
|
set(CPACK_COMPONENT_DEVELOPMENT_DEPENDS runtime)
|
||||||
|
set(CPACK_COMPONENT_PROGRAMS_DEPENDS runtime)
|
||||||
|
set(CPACK_DEB_COMPONENT_INSTALL ON)
|
||||||
|
set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "${PACKAGE_TARNAME}")
|
||||||
|
set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_NAME "${PACKAGE_TARNAME}${LIBXSLT_MAJOR_VERSION}-dev")
|
||||||
|
set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_SECTION "libdevel")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${PACKAGE_URL})
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_NAME ${PACKAGE_TARNAME})
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
|
||||||
|
set(CPACK_DEBIAN_PROGRAMS_PACKAGE_DEPENDS "${PACKAGE_TARNAME}")
|
||||||
|
set(CPACK_DEBIAN_PROGRAMS_PACKAGE_NAME "${PACKAGE_TARNAME}-utils")
|
||||||
|
set(CPACK_DEBIAN_PROGRAMS_PACKAGE_SECTION "utils")
|
||||||
|
set(CPACK_DEBIAN_RUNTIME_PACKAGE_NAME ${PACKAGE_TARNAME})
|
||||||
|
set(CPACK_DEBIAN_RUNTIME_PACKAGE_RECOMMENDS "${PACKAGE_TARNAME}-utils")
|
||||||
|
set(CPACK_DEBIAN_RUNTIME_PACKAGE_SECTION "libs")
|
||||||
|
set(CPACK_NSIS_PACKAGE_NAME ${PACKAGE_STRING})
|
||||||
|
set(CPACK_NSIS_URL_INFO_ABOUT ${PACKAGE_URL})
|
||||||
|
set(CPACK_PACKAGE_CONTACT ${PACKAGE_BUGREPORT})
|
||||||
|
set(CPACK_PACKAGE_DISPLAY_NAME ${PACKAGE_STRING})
|
||||||
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PACKAGE_TARNAME}-${PACKAGE_VERSION}")
|
||||||
|
set(CPACK_PACKAGE_NAME ${PACKAGE_TARNAME})
|
||||||
|
set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION})
|
||||||
|
set(CPACK_PACKAGE_VERSION_MAJOR ${LIBXSLT_MAJOR_VERSION})
|
||||||
|
set(CPACK_PACKAGE_VERSION_MINOR ${LIBXSLT_MINOR_VERSION})
|
||||||
|
set(CPACK_PACKAGE_VERSION_PATCH ${LIBXSLT_MICRO_VERSION})
|
||||||
|
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/Copyright)
|
||||||
|
set(CPACK_RPM_COMPONENT_INSTALL ON)
|
||||||
|
set(CPACK_RPM_development_PACKAGE_NAME "${PACKAGE_NAME}-devel")
|
||||||
|
set(CPACK_RPM_development_PACKAGE_REQUIRES "${PACKAGE_NAME}")
|
||||||
|
set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
|
||||||
|
set(CPACK_RPM_PACKAGE_NAME ${PACKAGE_TARNAME})
|
||||||
|
set(CPACK_RPM_PACKAGE_URL ${PACKAGE_URL})
|
||||||
|
set(CPACK_RPM_programs_PACKAGE_NAME "${PACKAGE_NAME}-utils")
|
||||||
|
set(CPACK_RPM_programs_PACKAGE_REQUIRES "${PACKAGE_NAME}")
|
||||||
|
set(CPACK_RPM_runtime_PACKAGE_NAME "${PACKAGE_NAME}")
|
||||||
|
set(CPACK_RPM_runtime_PACKAGE_SUGGESTS "${PACKAGE_NAME}-utils")
|
||||||
|
|
||||||
|
include(CPack)
|
219
config.h.cmake.in
Normal file
219
config.h.cmake.in
Normal file
@@ -0,0 +1,219 @@
|
|||||||
|
/* config.h.in. Generated from configure.in by autoheader. */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `clock_gettime' function. */
|
||||||
|
#cmakedefine HAVE_CLOCK_GETTIME 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
#cmakedefine HAVE_DLFCN_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <errno.h> header file. */
|
||||||
|
#cmakedefine HAVE_ERRNO_H 1
|
||||||
|
|
||||||
|
/* Define if fabs is there */
|
||||||
|
#cmakedefine HAVE_FABS
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <float.h> header file. */
|
||||||
|
#cmakedefine HAVE_FLOAT_H 1
|
||||||
|
|
||||||
|
/* Define if floor is there */
|
||||||
|
#cmakedefine HAVE_FLOOR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `fprintf' function. */
|
||||||
|
#cmakedefine HAVE_FPRINTF 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <fp_class.h> header file. */
|
||||||
|
#cmakedefine HAVE_FP_CLASS_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `ftime' function. */
|
||||||
|
#cmakedefine HAVE_FTIME 1
|
||||||
|
|
||||||
|
/* Define if gcrypt library is available. */
|
||||||
|
#cmakedefine HAVE_GCRYPT 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `gettimeofday' function. */
|
||||||
|
#cmakedefine HAVE_GETTIMEOFDAY 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `gmtime' function. */
|
||||||
|
#cmakedefine HAVE_GMTIME 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `gmtime_r' function. */
|
||||||
|
#cmakedefine HAVE_GMTIME_R 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <ieeefp.h> header file. */
|
||||||
|
#cmakedefine HAVE_IEEEFP_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#cmakedefine HAVE_INTTYPES_H 1
|
||||||
|
|
||||||
|
/* Define if pthread library is there (-lpthread) */
|
||||||
|
#cmakedefine HAVE_LIBPTHREAD
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <locale.h> header file. */
|
||||||
|
#cmakedefine HAVE_LOCALE_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `localtime' function. */
|
||||||
|
#cmakedefine HAVE_LOCALTIME 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `localtime_r' function. */
|
||||||
|
#cmakedefine HAVE_LOCALTIME_R 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <math.h> header file. */
|
||||||
|
#cmakedefine HAVE_MATH_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#cmakedefine HAVE_MEMORY_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <nan.h> header file. */
|
||||||
|
#cmakedefine HAVE_NAN_H 1
|
||||||
|
|
||||||
|
/* Define if pow is there */
|
||||||
|
#cmakedefine HAVE_POW
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `printf' function. */
|
||||||
|
#cmakedefine HAVE_PRINTF 1
|
||||||
|
|
||||||
|
/* Define if <pthread.h> is there */
|
||||||
|
#cmakedefine HAVE_PTHREAD_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `snprintf' function. */
|
||||||
|
#cmakedefine HAVE_SNPRINTF 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `sprintf' function. */
|
||||||
|
#cmakedefine HAVE_SPRINTF 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `sscanf' function. */
|
||||||
|
#cmakedefine HAVE_SSCANF 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `stat' function. */
|
||||||
|
#cmakedefine HAVE_STAT 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdarg.h> header file. */
|
||||||
|
#cmakedefine HAVE_STDARG_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#cmakedefine HAVE_STDINT_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#cmakedefine HAVE_STDLIB_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#cmakedefine HAVE_STRINGS_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#cmakedefine HAVE_STRING_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strxfrm_l' function. */
|
||||||
|
#cmakedefine HAVE_STRXFRM_L 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||||
|
#cmakedefine HAVE_SYS_SELECT_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#cmakedefine HAVE_SYS_STAT_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/timeb.h> header file. */
|
||||||
|
#cmakedefine HAVE_SYS_TIMEB_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||||
|
#cmakedefine HAVE_SYS_TIME_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#cmakedefine HAVE_SYS_TYPES_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `time' function. */
|
||||||
|
#cmakedefine HAVE_TIME 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <time.h> header file. */
|
||||||
|
#cmakedefine HAVE_TIME_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#cmakedefine HAVE_UNISTD_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `vfprintf' function. */
|
||||||
|
#cmakedefine HAVE_VFPRINTF 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `vsnprintf' function. */
|
||||||
|
#cmakedefine HAVE_VSNPRINTF 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `vsprintf' function. */
|
||||||
|
#cmakedefine HAVE_VSPRINTF 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <xlocale.h> header file. */
|
||||||
|
#cmakedefine HAVE_XLOCALE_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `_stat' function. */
|
||||||
|
#cmakedefine HAVE__STAT 1
|
||||||
|
|
||||||
|
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||||
|
#cmakedefine LT_OBJDIR @LT_OBJDIR@
|
||||||
|
|
||||||
|
/* Name of package */
|
||||||
|
#cmakedefine PACKAGE "@PACKAGE@"
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@"
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@"
|
||||||
|
|
||||||
|
/* Define to the home page for this package. */
|
||||||
|
#cmakedefine PACKAGE_URL "@PACKAGE_URL@"
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@"
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#cmakedefine STDC_HEADERS 1
|
||||||
|
|
||||||
|
/* Enable extensions on AIX 3, Interix. */
|
||||||
|
#ifndef _ALL_SOURCE
|
||||||
|
#cmakedefine _ALL_SOURCE 1
|
||||||
|
#endif
|
||||||
|
/* Enable GNU extensions on systems that have them. */
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
#cmakedefine _GNU_SOURCE 1
|
||||||
|
#endif
|
||||||
|
/* Enable threading extensions on Solaris. */
|
||||||
|
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||||
|
#cmakedefine _POSIX_PTHREAD_SEMANTICS 1
|
||||||
|
#endif
|
||||||
|
/* Enable extensions on HP NonStop. */
|
||||||
|
#ifndef _TANDEM_SOURCE
|
||||||
|
#cmakedefine _TANDEM_SOURCE 1
|
||||||
|
#endif
|
||||||
|
/* Enable general extensions on Solaris. */
|
||||||
|
#ifndef __EXTENSIONS__
|
||||||
|
#cmakedefine __EXTENSIONS__ 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Version number of package */
|
||||||
|
#cmakedefine VERSION "@VERSION@"
|
||||||
|
|
||||||
|
/* Define if debugging support is enabled */
|
||||||
|
#cmakedefine WITH_DEBUGGER 1
|
||||||
|
|
||||||
|
/* Define to 1 if on MINIX. */
|
||||||
|
#cmakedefine _MINIX 1
|
||||||
|
|
||||||
|
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||||
|
this defined. */
|
||||||
|
#cmakedefine _POSIX_1_SOURCE 2
|
||||||
|
|
||||||
|
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||||
|
#cmakedefine _POSIX_SOURCE 1
|
||||||
|
|
||||||
|
/* Using the Win32 Socket implementation */
|
||||||
|
#cmakedefine _WINSOCKAPI_ 1
|
||||||
|
|
||||||
|
/* Win32 Std C name mangling work-around */
|
||||||
|
#cmakedefine snprintf
|
||||||
|
|
||||||
|
/* Win32 Std C name mangling work-around */
|
||||||
|
#cmakedefine vsnprintf
|
68
libxslt-config.cmake.in
Normal file
68
libxslt-config.cmake.in
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
set(LIBXSLT_VERSION "@VERSION@")
|
||||||
|
set(LIBXSLT_VERSION_MAJOR "@LIBXSLT_MAJOR_VERSION@")
|
||||||
|
set(LIBXSLT_VERSION_MINOR "@LIBXSLT_MINOR_VERSION@")
|
||||||
|
set(LIBXSLT_VERSION_PATCH "@LIBXSLT_MICRO_VERSION@")
|
||||||
|
|
||||||
|
@PACKAGE_INIT@
|
||||||
|
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/libxslt-export.cmake")
|
||||||
|
|
||||||
|
set(LIBXSLT_DEFINITIONS "")
|
||||||
|
set(LIBXSLT_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@")
|
||||||
|
set(LIBXSLT_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_LIBDIR@")
|
||||||
|
|
||||||
|
macro(select_library_location target basename)
|
||||||
|
foreach(property IN ITEMS IMPORTED_LOCATION IMPORTED_IMPLIB)
|
||||||
|
get_target_property(${basename}_${property}_DEBUG ${target} ${property}_DEBUG)
|
||||||
|
get_target_property(${basename}_${property}_MINSIZEREL ${target} ${property}_MINSIZEREL)
|
||||||
|
get_target_property(${basename}_${property}_RELEASE ${target} ${property}_RELEASE)
|
||||||
|
get_target_property(${basename}_${property}_RELWITHDEBINFO ${target} ${property}_RELWITHDEBINFO)
|
||||||
|
|
||||||
|
if(${basename}_${property}_DEBUG AND ${basename}_${property}_RELEASE)
|
||||||
|
set(${basename}_LIBRARIES debug ${${basename}_${property}_DEBUG} optimized ${${basename}_${property}_RELEASE})
|
||||||
|
elseif(${basename}_${property}_DEBUG AND ${basename}_${property}_RELWITHDEBINFO)
|
||||||
|
set(${basename}_LIBRARIES debug ${${basename}_${property}_DEBUG} optimized ${${basename}_${property}_RELWITHDEBINFO})
|
||||||
|
elseif(${basename}_${property}_DEBUG AND ${basename}_${property}_MINSIZEREL)
|
||||||
|
set(${basename}_LIBRARIES debug ${${basename}_${property}_DEBUG} optimized ${${basename}_${property}_MINSIZEREL})
|
||||||
|
elseif(${basename}_${property}_RELEASE)
|
||||||
|
set(${basename}_LIBRARIES ${${basename}_${property}_RELEASE})
|
||||||
|
elseif(${basename}_${property}_RELWITHDEBINFO)
|
||||||
|
set(${basename}_LIBRARIES ${${basename}_${property}_RELWITHDEBINFO})
|
||||||
|
elseif(${basename}_${property}_MINSIZEREL)
|
||||||
|
set(${basename}_LIBRARIES ${${basename}_${property}_MINSIZEREL})
|
||||||
|
elseif(${basename}_${property}_DEBUG)
|
||||||
|
set(${basename}_LIBRARIES ${${basename}_${property}_DEBUG})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
select_library_location(LibXslt::LibXslt LIBXSLT)
|
||||||
|
select_library_location(LibXslt::LibExslt LIBXSLT_EXSLT)
|
||||||
|
|
||||||
|
include(CMakeFindDependencyMacro)
|
||||||
|
|
||||||
|
find_dependency(LibXml2)
|
||||||
|
list(APPEND LIBXSLT_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIRS})
|
||||||
|
list(APPEND LIBXSLT_LIBRARIES ${LIBXML2_LIBRARIES})
|
||||||
|
|
||||||
|
if(NOT @BUILD_SHARED_LIBS@)
|
||||||
|
if(@Threads_FOUND@)
|
||||||
|
find_dependency(Threads)
|
||||||
|
list(APPEND LIBXSLT_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(@LIBXSLT_WITH_CRYPTO@)
|
||||||
|
list(APPEND LIBXSLT_LIBRARIES gcrypt)
|
||||||
|
list(APPEND LIBXSLT_EXSLT_LIBRARIES gcrypt)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
list(APPEND LIBXSLT_LIBRARIES m)
|
||||||
|
list(APPEND LIBXSLT_EXSLT_LIBRARIES m)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
list(APPEND LIBXSLT_LIBRARIES ws2_32)
|
||||||
|
list(APPEND LIBXSLT_EXSLT_LIBRARIES ws2_32)
|
||||||
|
endif()
|
||||||
|
endif()
|
Reference in New Issue
Block a user