mirror of
				https://gitlab.gnome.org/GNOME/libxslt
				synced 2025-10-30 14:45:36 +03:00 
			
		
		
		
	Add missing compile definition for static builds to CMake
See libxml2 commit:
7a62870a3c
			
			
This commit is contained in:
		| @@ -193,6 +193,10 @@ set( | ||||
| add_library(LibXslt ${LIBXSLT_HDRS} ${LIBXSLT_SRCS}) | ||||
| add_library(LibXslt::LibXslt ALIAS LibXslt) | ||||
|  | ||||
| if(NOT BUILD_SHARED_LIBS) | ||||
| 	target_compile_definitions(LibXslt INTERFACE LIBXSLT_STATIC) | ||||
| endif() | ||||
|  | ||||
| target_include_directories( | ||||
| 	LibXslt | ||||
| 	PUBLIC | ||||
| @@ -276,6 +280,10 @@ set( | ||||
| add_library(LibExslt ${LIBEXSLT_HDRS} ${LIBEXSLT_SRCS}) | ||||
| add_library(LibXslt::LibExslt ALIAS LibExslt) | ||||
|  | ||||
| if(NOT BUILD_SHARED_LIBS) | ||||
| 	target_compile_definitions(LibExslt INTERFACE LIBEXSLT_STATIC) | ||||
| endif() | ||||
|  | ||||
| target_include_directories( | ||||
| 	LibExslt | ||||
| 	PUBLIC | ||||
|   | ||||
| @@ -83,6 +83,9 @@ list(APPEND LIBXSLT_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIRS}) | ||||
| list(APPEND LIBXSLT_LIBRARIES ${LIBXML2_LIBRARIES}) | ||||
|  | ||||
| if(NOT LIBXSLT_SHARED) | ||||
| 	set(LIBXSLT_DEFINITIONS -DLIBXSLT_STATIC) | ||||
| 	set(LIBXSLT_EXSLT_DEFINITIONS -DLIBEXSLT_STATIC) | ||||
|  | ||||
| 	if(LIBXSLT_WITH_CRYPTO) | ||||
| 		list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) | ||||
| 		find_dependency(Gcrypt) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user