-
-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: format cmake files with cmake-format
- Loading branch information
Showing
7 changed files
with
62 additions
and
90 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
set(BOOST_VER 1.84.0) | ||
|
||
if(NOT EXISTS "boost-${BOOST_VER}.tar.xz") | ||
message(STATUS "Downloading Boost ${BOOST_VER} ......") | ||
file( | ||
DOWNLOAD "https://github.com/boostorg/boost/releases/download/boost-${BOOST_VER}/boost-${BOOST_VER}.tar.xz" boost-${BOOST_VER}.tar.xz | ||
EXPECTED_HASH SHA256=2e64e5d79a738d0fa6fb546c6e5c2bd28f88d268a2a080546f74e5ff98f29d0e | ||
SHOW_PROGRESS | ||
) | ||
message(STATUS "Downloading Boost ${BOOST_VER} ......") | ||
file( | ||
DOWNLOAD | ||
"https://github.com/boostorg/boost/releases/download/boost-${BOOST_VER}/boost-${BOOST_VER}.tar.xz" | ||
boost-${BOOST_VER}.tar.xz | ||
EXPECTED_HASH | ||
SHA256=2e64e5d79a738d0fa6fb546c6e5c2bd28f88d268a2a080546f74e5ff98f29d0e | ||
SHOW_PROGRESS) | ||
|
||
message(STATUS "Remove older version Boost") | ||
file(REMOVE_RECURSE "${CMAKE_SOURCE_DIR}/boost") | ||
message(STATUS "Remove older version Boost") | ||
file(REMOVE_RECURSE "${CMAKE_SOURCE_DIR}/boost") | ||
endif() | ||
|
||
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/boost") | ||
message(STATUS "Extracting Boost ${BOOST_VER} ......") | ||
file(ARCHIVE_EXTRACT INPUT boost-${BOOST_VER}.tar.xz | ||
DESTINATION ${CMAKE_SOURCE_DIR} | ||
) | ||
file(RENAME "boost-${BOOST_VER}" boost) | ||
message(STATUS "Extracting Boost ${BOOST_VER} ......") | ||
file(ARCHIVE_EXTRACT INPUT boost-${BOOST_VER}.tar.xz DESTINATION | ||
${CMAKE_SOURCE_DIR}) | ||
file(RENAME "boost-${BOOST_VER}" boost) | ||
endif() | ||
|
||
set(BOOST_INCLUDE_LIBRARIES | ||
algorithm | ||
crc | ||
date_time | ||
dll | ||
interprocess | ||
range | ||
regex | ||
scope_exit | ||
signals2 | ||
utility | ||
uuid | ||
# librime-charcode | ||
locale | ||
asio | ||
# librime-lua | ||
optional | ||
) | ||
algorithm | ||
crc | ||
date_time | ||
dll | ||
interprocess | ||
range | ||
regex | ||
scope_exit | ||
signals2 | ||
utility | ||
uuid | ||
# librime-charcode | ||
locale | ||
asio | ||
# librime-lua | ||
optional) | ||
|
||
add_subdirectory(boost EXCLUDE_FROM_ALL) |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
set(Glog_FOUND TRUE) | ||
set(Glog_LIBRARY glog) | ||
get_target_property(Glog_INCLUDE_PATH glog::glog | ||
INTERFACE_INCLUDE_DIRECTORIES) | ||
get_target_property(Glog_INCLUDE_PATH glog::glog INTERFACE_INCLUDE_DIRECTORIES) |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
set(Marisa_FOUND TRUE) | ||
set(Marisa_LIBRARY marisa) | ||
get_target_property(Marisa_INCLUDE_PATH marisa INTERFACE_INCLUDE_DIRECTORIES) | ||
|
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 |
---|---|---|
@@ -1,17 +1,10 @@ | ||
set(ICONV_SOURCES | ||
libiconv/libcharset/lib/localcharset.c | ||
libiconv/lib/iconv.c | ||
libiconv/lib/relocatable.c | ||
) | ||
set(ICONV_SOURCES libiconv/libcharset/lib/localcharset.c libiconv/lib/iconv.c | ||
libiconv/lib/relocatable.c) | ||
add_library(iconv STATIC ${ICONV_SOURCES}) | ||
add_library(Iconv::Iconv ALIAS iconv) | ||
target_compile_definitions(iconv PRIVATE | ||
LIBDIR="c" BUILDING_LIBICONV IN_LIBRARY | ||
) | ||
target_include_directories(iconv PRIVATE | ||
"libiconv/lib" | ||
"libiconv/libcharset/include" | ||
) | ||
target_include_directories(iconv PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/libiconv/include> | ||
) | ||
target_compile_definitions(iconv PRIVATE LIBDIR="c" BUILDING_LIBICONV | ||
IN_LIBRARY) | ||
target_include_directories(iconv PRIVATE "libiconv/lib" | ||
"libiconv/libcharset/include") | ||
target_include_directories( | ||
iconv PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/libiconv/include>) |
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
# Since OpenCC doesn't include its headers in the binary dir, | ||
# we need to install them manually. | ||
file(GLOB LIBOPENCC_HEADERS | ||
OpenCC/src/*.hpp | ||
"${CMAKE_BINARY_DIR}/OpenCC/src/opencc_config.h" | ||
) | ||
# Since OpenCC doesn't include its headers in the binary dir, we need to install | ||
# them manually. | ||
file(GLOB LIBOPENCC_HEADERS OpenCC/src/*.hpp | ||
"${CMAKE_BINARY_DIR}/OpenCC/src/opencc_config.h") | ||
file(COPY ${LIBOPENCC_HEADERS} DESTINATION "${CMAKE_BINARY_DIR}/include/opencc") |
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