Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
326d5fa7
Commit
326d5fa7
authored
Oct 10, 2016
by
Daniel Pfeifer
Browse files
Allow custom built libarchive to use custom built expat.
Expat is built anyway.
parent
7d45db99
Changes
1
Show whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
326d5fa7
...
...
@@ -367,6 +367,23 @@ macro (CMAKE_BUILD_UTILITIES)
add_subdirectory
(
Utilities/cmcompress
)
CMAKE_SET_TARGET_FOLDER
(
cmcompress
"Utilities/3rdParty"
)
#---------------------------------------------------------------------
# Build expat library for CMake, CTest, and libarchive.
if
(
CMAKE_USE_SYSTEM_EXPAT
)
find_package
(
EXPAT
)
if
(
NOT EXPAT_FOUND
)
message
(
FATAL_ERROR
"CMAKE_USE_SYSTEM_EXPAT is ON but a expat is not found!"
)
endif
()
set
(
CMAKE_EXPAT_INCLUDES
${
EXPAT_INCLUDE_DIRS
}
)
set
(
CMAKE_EXPAT_LIBRARIES
${
EXPAT_LIBRARIES
}
)
else
()
set
(
CMAKE_EXPAT_INCLUDES
)
set
(
CMAKE_EXPAT_LIBRARIES cmexpat
)
add_subdirectory
(
Utilities/cmexpat
)
CMAKE_SET_TARGET_FOLDER
(
cmexpat
"Utilities/3rdParty"
)
endif
()
#---------------------------------------------------------------------
# Build or use system libbz2 for libarchive.
if
(
NOT CMAKE_USE_SYSTEM_LIBARCHIVE
)
...
...
@@ -410,6 +427,8 @@ macro (CMAKE_BUILD_UTILITIES)
set
(
CMAKE_TAR_INCLUDES
${
LibArchive_INCLUDE_DIRS
}
)
set
(
CMAKE_TAR_LIBRARIES
${
LibArchive_LIBRARIES
}
)
else
()
set
(
EXPAT_INCLUDE_DIR
${
CMAKE_EXPAT_INCLUDES
}
)
set
(
EXPAT_LIBRARY
${
CMAKE_EXPAT_LIBRARIES
}
)
set
(
ZLIB_INCLUDE_DIR
${
CMAKE_ZLIB_INCLUDES
}
)
set
(
ZLIB_LIBRARY
${
CMAKE_ZLIB_LIBRARIES
}
)
add_definitions
(
-DLIBARCHIVE_STATIC
)
...
...
@@ -419,7 +438,7 @@ macro (CMAKE_BUILD_UTILITIES)
set
(
ENABLE_ZLIB ON CACHE INTERNAL
"Enable the use of the system found ZLIB library if found"
)
set
(
ENABLE_BZip2 ON CACHE INTERNAL
"Enable the use of the system found BZip2 library if found"
)
set
(
ENABLE_LIBXML2 OFF CACHE INTERNAL
"Enable the use of the system found libxml2 library if found"
)
set
(
ENABLE_EXPAT O
FF
CACHE INTERNAL
"Enable the use of the system found EXPAT library if found"
)
set
(
ENABLE_EXPAT O
N
CACHE INTERNAL
"Enable the use of the system found EXPAT library if found"
)
set
(
ENABLE_PCREPOSIX OFF CACHE INTERNAL
"Enable the use of the system found PCREPOSIX library if found"
)
set
(
ENABLE_LibGCC OFF CACHE INTERNAL
"Enable the use of the system found LibGCC library if found"
)
set
(
ENABLE_XATTR OFF CACHE INTERNAL
"Enable extended attribute support"
)
...
...
@@ -431,23 +450,6 @@ macro (CMAKE_BUILD_UTILITIES)
set
(
CMAKE_TAR_LIBRARIES cmlibarchive
${
BZIP2_LIBRARIES
}
)
endif
()
#---------------------------------------------------------------------
# Build expat library for CMake and CTest.
if
(
CMAKE_USE_SYSTEM_EXPAT
)
find_package
(
EXPAT
)
if
(
NOT EXPAT_FOUND
)
message
(
FATAL_ERROR
"CMAKE_USE_SYSTEM_EXPAT is ON but a expat is not found!"
)
endif
()
set
(
CMAKE_EXPAT_INCLUDES
${
EXPAT_INCLUDE_DIRS
}
)
set
(
CMAKE_EXPAT_LIBRARIES
${
EXPAT_LIBRARIES
}
)
else
()
set
(
CMAKE_EXPAT_INCLUDES
)
set
(
CMAKE_EXPAT_LIBRARIES cmexpat
)
add_subdirectory
(
Utilities/cmexpat
)
CMAKE_SET_TARGET_FOLDER
(
cmexpat
"Utilities/3rdParty"
)
endif
()
#---------------------------------------------------------------------
# Build jsoncpp library.
if
(
CMAKE_USE_SYSTEM_JSONCPP
)
...
...
Brad King
💬
@brad.king
Mentioned in commit
9c7fc00a
·
Oct 10, 2016
Mentioned in commit
9c7fc00a
Mentioned in commit 9c7fc00a45b6f0891c95fba707b0e2ce9d2e2dbf
Toggle commit list
Write
Preview
Supports
Markdown
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