summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2023-05-08 13:05:35 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2023-05-08 13:05:35 +0200
commitb9196c0b357a903ad0a41cb4acce62cc1b0f2057 (patch)
tree15a783b033fe484d6b126827abdf9499fed2457b
parent49ee03fc8f963a1ff638a6e55235dbd10adfc111 (diff)
downloadlibxslt-b9196c0b357a903ad0a41cb4acce62cc1b0f2057.tar.gz
cmake: Move version script blockv1.1.38
-rw-r--r--CMakeLists.txt30
1 files changed, 15 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a8e12c21..93d61eca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,21 +86,6 @@ endforeach()
set(MODULE_EXTENSION "${CMAKE_SHARED_LIBRARY_SUFFIX}")
-if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "GNU")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow \
--Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return \
--Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \
--Wredundant-decls -Wno-long-long -Wno-format-extra-args")
-
- if(BUILD_SHARED_LIBS AND UNIX AND NOT APPLE)
- check_linker_flag(C "LINKER:--undefined-version" FLAG_UNDEFINED_VERSION)
- if (FLAG_UNDEFINED_VERSION)
- target_link_options(LibXslt PRIVATE "LINKER:--undefined-version")
- endif()
- target_link_options(LibXslt PRIVATE "LINKER:--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libxslt/libxslt.syms")
- endif()
-endif()
-
if(LIBXSLT_WITH_CRYPTO AND NOT WIN32)
list(APPEND CMAKE_REQUIRED_LIBRARIES Gcrypt::Gcrypt)
endif()
@@ -221,6 +206,21 @@ if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(LibXslt INTERFACE LIBXSLT_STATIC)
endif()
+if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow \
+-Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return \
+-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \
+-Wredundant-decls -Wno-long-long -Wno-format-extra-args")
+
+ if(BUILD_SHARED_LIBS AND UNIX AND NOT APPLE)
+ check_linker_flag(C "LINKER:--undefined-version" FLAG_UNDEFINED_VERSION)
+ if (FLAG_UNDEFINED_VERSION)
+ target_link_options(LibXslt PRIVATE "LINKER:--undefined-version")
+ endif()
+ target_link_options(LibXslt PRIVATE "LINKER:--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libxslt/libxslt.syms")
+ endif()
+endif()
+
target_include_directories(
LibXslt
PUBLIC