mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
build: Only build xmlcatalog executable if enabled
This commit is contained in:
parent
a5764b56d2
commit
52afde07c1
@ -439,12 +439,11 @@ endif()
|
||||
|
||||
if(LIBXML2_WITH_PROGRAMS)
|
||||
add_executable(xmllint xmllint.c shell.c)
|
||||
set(PROGRAMS xmllint)
|
||||
if(LIBXML2_WITH_CATALOG AND LIBXML2_WITH_OUTPUT)
|
||||
add_executable(xmlcatalog xmlcatalog.c)
|
||||
set(
|
||||
PROGRAMS
|
||||
xmlcatalog
|
||||
xmllint
|
||||
)
|
||||
list(APPEND PROGRAMS xmlcatalog)
|
||||
endif()
|
||||
foreach(PROGRAM ${PROGRAMS})
|
||||
add_executable(LibXml2::${PROGRAM} ALIAS ${PROGRAM})
|
||||
target_link_libraries(${PROGRAM} LibXml2)
|
||||
|
16
Makefile.am
16
Makefile.am
@ -26,7 +26,7 @@ check_PROGRAMS = \
|
||||
testparser \
|
||||
testrecurse
|
||||
|
||||
bin_PROGRAMS = xmllint xmlcatalog
|
||||
bin_PROGRAMS = xmllint
|
||||
|
||||
bin_SCRIPTS = xml2-config
|
||||
|
||||
@ -48,6 +48,15 @@ if WITH_C14N_SOURCES
|
||||
libxml2_la_SOURCES += c14n.c
|
||||
endif
|
||||
if WITH_CATALOG_SOURCES
|
||||
if WITH_OUTPUT_SOURCES
|
||||
bin_PROGRAMS += xmlcatalog
|
||||
|
||||
xmlcatalog_SOURCES = xmlcatalog.c
|
||||
xmlcatalog_CFLAGS = $(AM_CFLAGS) $(RDL_CFLAGS) $(ICONV_CFLAGS)
|
||||
xmlcatalog_DEPENDENCIES = $(DEPS)
|
||||
xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS)
|
||||
endif
|
||||
|
||||
libxml2_la_SOURCES += catalog.c
|
||||
endif
|
||||
if WITH_DEBUG_SOURCES
|
||||
@ -138,11 +147,6 @@ xmllint_CFLAGS = $(AM_CFLAGS) $(RDL_CFLAGS) $(ICONV_CFLAGS)
|
||||
xmllint_DEPENDENCIES = $(DEPS)
|
||||
xmllint_LDADD= $(RDL_LIBS) $(LDADDS)
|
||||
|
||||
xmlcatalog_SOURCES=xmlcatalog.c
|
||||
xmlcatalog_CFLAGS = $(AM_CFLAGS) $(RDL_CFLAGS) $(ICONV_CFLAGS)
|
||||
xmlcatalog_DEPENDENCIES = $(DEPS)
|
||||
xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS)
|
||||
|
||||
testModule_SOURCES=testModule.c
|
||||
testModule_DEPENDENCIES = $(DEPS)
|
||||
testModule_LDADD= $(LDADDS)
|
||||
|
@ -484,13 +484,15 @@ executable(
|
||||
|
||||
## xmlcatalog tool
|
||||
|
||||
executable(
|
||||
if want_catalog and want_output
|
||||
executable(
|
||||
'xmlcatalog',
|
||||
files('xmlcatalog.c'),
|
||||
dependencies: [xml_dep, xmllint_deps],
|
||||
include_directories: config_dir,
|
||||
install: true,
|
||||
)
|
||||
)
|
||||
endif
|
||||
|
||||
## testdso module
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user