mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
8c5ecd1c01
Similiar to CMAKE_SOURCE_DIR. Using CMAKE_BINARY_DIR will put the generated header (stdlib.h) in build/include/solidity/libstdlib but it should start with build/third-party/solidity or the library can't find the header. Signed-off-by: Jun Zhang <jun@junz.org>
21 lines
574 B
CMake
21 lines
574 B
CMake
include(FetchContent)
|
|
|
|
FetchContent_Declare(
|
|
fmtlib
|
|
PREFIX "${PROJECT_BINARY_DIR}/deps"
|
|
DOWNLOAD_DIR "${PROJECT_SOURCE_DIR}/deps/downloads"
|
|
DOWNLOAD_NAME fmt-8.0.1.tar.gz
|
|
URL https://github.com/fmtlib/fmt/archive/8.0.1.tar.gz
|
|
URL_HASH SHA256=b06ca3130158c625848f3fb7418f235155a4d389b2abc3a6245fb01cb0eb1e01
|
|
)
|
|
|
|
if (CMAKE_VERSION VERSION_LESS "3.14.0")
|
|
FetchContent_GetProperties(fmtlib)
|
|
if (NOT fmtlib_POPULATED)
|
|
FetchContent_Populate(fmtlib)
|
|
add_subdirectory(${fmtlib_SOURCE_DIR} ${fmtlib_BINARY_DIR})
|
|
endif()
|
|
else()
|
|
FetchContent_MakeAvailable(fmtlib)
|
|
endif()
|