-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Changes to use bzip2 1.0.8 on windows * remove path added unnecessarily * Change fetch url to github permalink plus ?raw=true, -L added for curl to follow redirects necessary to retrieve desired final object * Place tiledb provided CMakeLists.txt in cmake/inputs/patches/ep_bzip2 and patch into externals/src/ep_bzip2 from there * Correct copy source path for CMakeLists.txt * Use cmake macro to reference cmake command rather than direct name Co-authored-by: dhoke4tdb <78012908+dhoke4tdb@users.noreply.github.com>
- Loading branch information
1 parent
a87da7f
commit 24b1532
Showing
2 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# | ||
# CMakeLists.txt | ||
# | ||
# | ||
# The MIT License | ||
# | ||
# Copyright (c) 2017 TileDB, Inc. | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in | ||
# all copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
# THE SOFTWARE. | ||
# | ||
|
||
project(bzip2) | ||
cmake_minimum_required(VERSION 2.8) | ||
|
||
set(SOURCES "blocksort.c" "huffman.c" "crctable.c" "randtable.c" | ||
"compress.c" "decompress.c" "bzlib.c") | ||
file(GLOB HEADERS "bzlib.h") | ||
|
||
# Set build flags | ||
if (WIN32) | ||
set(CMAKE_C_FLAGS "/DWIN32 /D_FILE_OFFSET_BITS=64 /MD /Ox /nologo") | ||
else() | ||
set(CMAKE_C_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -Winline -O2 -g") | ||
endif() | ||
|
||
# Create libraries | ||
add_library(bzip2_static STATIC ${SOURCES}) | ||
set_target_properties(bzip2_static PROPERTIES OUTPUT_NAME "libbz2static") | ||
add_library(bzip2_shared SHARED ${SOURCES} libbz2.def) | ||
set_target_properties(bzip2_shared PROPERTIES OUTPUT_NAME "libbz2") | ||
|
||
# Install libraries | ||
install( | ||
TARGETS bzip2_static bzip2_shared | ||
RUNTIME DESTINATION bin | ||
LIBRARY DESTINATION lib | ||
ARCHIVE DESTINATION lib | ||
) | ||
install(FILES ${HEADERS} DESTINATION include) |