Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
ed1eca8f
Unverified
Commit
ed1eca8f
authored
Nov 28, 2023
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build zlib if needed
parent
f792e6f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
2 deletions
+38
-2
CMakeLists.txt
+6
-2
external/zlib/CMakeLists.txt
+32
-0
No files found.
CMakeLists.txt
View file @
ed1eca8f
...
...
@@ -204,7 +204,10 @@ if(MSVC)
endforeach
()
endif
()
find_package
(
ZLIB REQUIRED
)
find_package
(
ZLIB QUIET
)
if
(
NOT ZLIB_FOUND
)
add_subdirectory
(
external/zlib EXCLUDE_FROM_ALL
)
endif
()
find_package
(
Eigen3 QUIET
)
...
...
@@ -334,7 +337,8 @@ target_include_directories(cifpp
"
${
BOOST_REGEX_INCLUDE_DIR
}
"
)
target_link_libraries
(
cifpp PUBLIC Threads::Threads ZLIB::ZLIB
${
CIFPP_REQUIRED_LIBRARIES
}
)
target_link_libraries
(
cifpp PUBLIC Threads::Threads
${
CIFPP_REQUIRED_LIBRARIES
}
)
target_link_libraries
(
cifpp PRIVATE $<BUILD_INTERFACE:ZLIB::ZLIB>
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
)
target_link_options
(
cifpp PRIVATE -undefined dynamic_lookup
)
...
...
external/zlib/CMakeLists.txt
0 → 100644
View file @
ed1eca8f
cmake_minimum_required
(
VERSION 3.16
)
project
(
private-static-zlib LANGUAGES C
)
include
(
FetchContent
)
FetchContent_Declare
(
zlib
GIT_REPOSITORY https://github.com/madler/zlib
GIT_TAG v1.3
)
FetchContent_Populate
(
zlib
)
add_library
(
zlibstatic STATIC
${
zlib_SOURCE_DIR
}
/adler32.c
${
zlib_SOURCE_DIR
}
/crc32.c
${
zlib_SOURCE_DIR
}
/deflate.c
${
zlib_SOURCE_DIR
}
/infback.c
${
zlib_SOURCE_DIR
}
/inffast.c
${
zlib_SOURCE_DIR
}
/inflate.c
${
zlib_SOURCE_DIR
}
/inftrees.c
${
zlib_SOURCE_DIR
}
/trees.c
${
zlib_SOURCE_DIR
}
/zutil.c
${
zlib_SOURCE_DIR
}
/compress.c
${
zlib_SOURCE_DIR
}
/uncompr.c
${
zlib_SOURCE_DIR
}
/gzclose.c
${
zlib_SOURCE_DIR
}
/gzlib.c
${
zlib_SOURCE_DIR
}
/gzread.c
${
zlib_SOURCE_DIR
}
/gzwrite.c
)
add_library
(
ZLIB::ZLIB ALIAS zlibstatic
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment