Skip to content

Commit acc617a

Browse files
committed
- if compiling without compression dont attempt to find libs
1 parent 459ef59 commit acc617a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libSBML/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ endif(WITH_XERCES)
496496
#
497497
# Locate bz2
498498
#
499-
499+
if (NOT DEFINED WITH_BZIP2)
500500
set(BZIP_INITIAL_VALUE)
501501
find_package(BZ2 QUIET)
502502

@@ -507,6 +507,8 @@ else()
507507
endif()
508508

509509
option(WITH_BZIP2 "Enable the use of bzip2 compression." ${BZIP_INITIAL_VALUE})
510+
endif()
511+
510512
set(USE_BZ2 OFF)
511513
if(WITH_BZIP2)
512514
find_package(BZ2 REQUIRED)
@@ -534,13 +536,15 @@ Separate multiple directories using semicolons." )
534536
#
535537
# Locate zlib
536538
#
539+
if (NOT DEFINED WITH_ZLIB)
537540
find_package(ZLIB QUIET)
538541
set(ZLIB_INITIAL_VALUE ON)
539542
if(NOT TARGET ZLIB::ZLIB)
540543
set(ZLIB_INITIAL_VALUE OFF)
541544
endif()
542545

543546
option(WITH_ZLIB "Enable the use of zip compression." ${ZLIB_INITIAL_VALUE} )
547+
endif()
544548

545549
set(USE_ZLIB OFF)
546550
if(WITH_ZLIB)

0 commit comments

Comments
 (0)