Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Brian Barran
Open VDS
Commits
f895c647
Commit
f895c647
authored
Aug 27, 2020
by
Jørgen Lind
Browse files
External 3rdparty dir
parent
3a52da1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMake/Fetch3rdPartyInBuild.cmake
View file @
f895c647
#This file depends on being in open-vds/CMake directory
set
(
Fetch3rdPartyDir
${
CMAKE_CURRENT_LIST_DIR
}
)
set
(
Fetch3rdPartyDir
Internal
"
${
CMAKE_CURRENT_LIST_DIR
}
"
)
macro
(
Fetch3rdParty_File name dir_prefix version ext url url_hash
)
get_filename_component
(
thirdParty
"
${
Fetch3rdPartyDir
}
/../3rdparty/
${
dir_prefix
}
"
ABSOLUTE
)
message
(
"OPENVDS_3RD_PARTY_DIR
${
OPENVDS_3RD_PARTY_DIR
}
"
)
if
(
OPENVDS_3RD_PARTY_DIR
)
set
(
Fetch3rdPartyDir
"
${
OPENVDS_3RD_PARTY_DIR
}
"
)
else
()
set
(
Fetch3rdPartyDir
"
${
Fetch3rdPartyDirInternal
}
/../3rdparty"
)
endif
()
get_filename_component
(
thirdParty
"
${
Fetch3rdPartyDir
}
/
${
dir_prefix
}
"
ABSOLUTE
)
file
(
MAKE_DIRECTORY
${
thirdParty
}
)
set
(
SRC_FILE
${
thirdParty
}
/
${
name
}
-
${
version
}
.
${
ext
}
)
set
(
${
name
}
_SOURCE_FILE
${
SRC_FILE
}
PARENT_SCOPE
)
...
...
@@ -17,11 +23,16 @@ macro(Fetch3rdParty_File name dir_prefix version ext url url_hash)
endmacro
()
macro
(
Fetch3rdParty_FileTarget name dir_prefix dest version url url_hash
)
get_filename_component
(
thirdParty
"
${
Fetch3rdPartyDir
}
/../3rdparty/
${
name
}
-
${
version
}
/
${
dir_prefix
}
"
ABSOLUTE
)
if
(
OPENVDS_3RD_PARTY_DIR
)
set
(
Fetch3rdPartyDir
"
${
OPENVDS_3RD_PARTY_DIR
}
"
)
else
()
set
(
Fetch3rdPartyDir
"
${
Fetch3rdPartyDirInternal
}
/../3rdparty"
)
endif
()
get_filename_component
(
thirdParty
"
${
Fetch3rdPartyDir
}
/
${
name
}
-
${
version
}
/
${
dir_prefix
}
"
ABSOLUTE
)
file
(
MAKE_DIRECTORY
${
thirdParty
}
)
set
(
DEST_FILE
${
thirdParty
}
/
${
dest
}
)
set
(
${
name
}
_SOURCE_FILE
${
DEST_FILE
}
PARENT_SCOPE
)
set
(
${
name
}
_SOURCE_DIR
${
Fetch3rdPartyDir
}
/
../3rdparty/
${
name
}
-
${
version
}
PARENT_SCOPE
)
set
(
${
name
}
_SOURCE_DIR
${
Fetch3rdPartyDir
}
/
${
name
}
-
${
version
}
PARENT_SCOPE
)
set
(
${
name
}
_VERSION
${
version
}
PARENT_SCOPE
)
if
(
NOT
(
EXISTS
${
DEST_FILE
}
))
file
(
DOWNLOAD
${
url
}
...
...
@@ -34,7 +45,12 @@ macro(Fetch3rdParty_FileTarget name dir_prefix dest version url url_hash)
endmacro
()
macro
(
Fetch3rdParty_Package name version url url_hash
)
get_filename_component
(
thirdParty
"
${
Fetch3rdPartyDir
}
/../3rdparty"
ABSOLUTE
)
if
(
OPENVDS_3RD_PARTY_DIR
)
set
(
Fetch3rdPartyDir
"
${
OPENVDS_3RD_PARTY_DIR
}
"
)
else
()
set
(
Fetch3rdPartyDir
"
${
Fetch3rdPartyDirInternal
}
/../3rdparty"
)
endif
()
get_filename_component
(
thirdParty
"
${
Fetch3rdPartyDir
}
"
ABSOLUTE
)
set
(
SRC_DIR
${
thirdParty
}
/
${
name
}
-
${
version
}
)
set
(
${
name
}
_SOURCE_DIR
${
SRC_DIR
}
PARENT_SCOPE
)
set
(
${
name
}
_VERSION
${
version
}
PARENT_SCOPE
)
...
...
@@ -63,13 +79,13 @@ function(Fetch3rdParty)
Fetch3rdParty_Package
(
curl 7.68.0 https://github.com/curl/curl/releases/download/curl-7_68_0/curl-7.68.0.tar.gz SHA256=1dd7604e418b0b9a9077f62f763f6684c1b092a7bc17e3f354b8ad5c964d7358
)
Fetch3rdParty_Package
(
libuv 1.34.1 https://github.com/libuv/libuv/archive/v1.34.1.tar.gz SHA256=e3e0105c9b26e181e0547607cb6893462beb0c652674c3795766b2e5555288b3
)
Fetch3rdParty_Package
(
zlib 1.2.11 http://zlib.net/zlib-1.2.11.tar.gz SHA256=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
)
Fetch3rdParty_Package
(
libressl 3.1.3 https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.1.3.tar.gz SHA256=c76b0316acf612ecb62f5cb014a20d972a663bd9e40abf952a86f3b998b69fa0
)
Fetch3rdParty_Package
(
libressl 3.1.3 https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.1.3.tar.gz SHA256=c76b0316acf612ecb62f5cb014a20d972a663bd9e40abf952a86f3b998b69fa0
)
Fetch3rdParty_Package
(
absl 20200225.2 https://codeload.github.com/abseil/abseil-cpp/tar.gz/20200225.2 SHA256=f41868f7a938605c92936230081175d1eae87f6ea2c248f41077c8f88316f111
)
Fetch3rdParty_Package
(
crc32c 1.1.1 https://codeload.github.com/google/crc32c/tar.gz/1.1.1 SHA256=a6533f45b1670b5d59b38a514d82b09c6fb70cc1050467220216335e873074e8
)
Fetch3rdParty_Package
(
google-cloud-cpp 1.14.0 https://codeload.github.com/googleapis/google-cloud-cpp/tar.gz/v1.14.0 SHA256=839b2d4dcb36a671734dac6b30ea8c298bbeaafcf7a45ee4a7d7aa5986b16569
)
Fetch3rdParty_File
(
testng java 6.14.3 jar https://repo1.maven.org/maven2/org/testng/testng/6.14.3/testng-6.14.3.jar MD5=9f17a8f9e99165e148c42b21f4b63d7c
)
Fetch3rdParty_File
(
jcommander java 1.72 jar https://repo1.maven.org/maven2/com/beust/jcommander/1.72/jcommander-1.72.jar MD5=9fde6bc0ba1032eceb7267fd1ad1657b
)
Fetch3rdParty_File
(
testng java 6.14.3 jar https://repo1.maven.org/maven2/org/testng/testng/6.14.3/testng-6.14.3.jar MD5=9f17a8f9e99165e148c42b21f4b63d7c
)
Fetch3rdParty_File
(
jcommander java 1.72 jar https://repo1.maven.org/maven2/com/beust/jcommander/1.72/jcommander-1.72.jar MD5=9fde6bc0ba1032eceb7267fd1ad1657b
)
Fetch3rdParty_FileTarget
(
google_nlohmann google/cloud/storage/internal nlohmann_json.hpp 3.4.0 https://raw.githubusercontent.com/nlohmann/json/v3.4.0/single_include/nlohmann/json.hpp MD5=27f3760c1d3a0fff7d8a2407d8db8f9d
)
endfunction
()
CMakeLists.txt
View file @
f895c647
...
...
@@ -18,6 +18,8 @@ set (TEST_CONNECTION "" CACHE STRING "Test connection string for OpenOptions")
set
(
OPENVDS_LIBDIR_SUFFIX
""
CACHE STRING
"Suffix to add to lib directories on linux"
)
set
(
OPENVDS_PYTHON_VERSION
""
CACHE STRING
"Exact Python 3 version to discover"
)
set
(
OPENVDS_JAVA_VERSION
""
CACHE STRING
"Exact Java version to discover"
)
set
(
OPENVDS_3RD_PARTY_DIR
""
CACHE PATH
"Path to put 3rd party source code, should be absolute path"
)
option
(
FORCE_NO_LIBDIR_SUFFIX
"Force there to be no suffix on lib directories linux"
)
get_property
(
LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS
)
...
...
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