mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
hg: make configparser buildable with cmake
Reviewed By: simpkins Differential Revision: D17505870 fbshipit-source-id: 974ed48424b46a0828133b9fb05da86129c3e21f
This commit is contained in:
parent
60b58132d1
commit
784f741312
@ -1 +1,2 @@
|
||||
add_subdirectory(configparser)
|
||||
add_subdirectory(revisionstore)
|
||||
|
31
lib/configparser/CMakeLists.txt
Normal file
31
lib/configparser/CMakeLists.txt
Normal file
@ -0,0 +1,31 @@
|
||||
rust_static_library(rust_configparser CRATE configparser)
|
||||
install_rust_static_library(
|
||||
rust_configparser
|
||||
EXPORT mercurial
|
||||
INSTALL_DIR lib
|
||||
)
|
||||
|
||||
add_library(configparser ConfigParser.cpp)
|
||||
set_target_properties(
|
||||
configparser
|
||||
PROPERTIES
|
||||
PUBLIC_HEADER
|
||||
ConfigParser.h
|
||||
)
|
||||
target_include_directories(configparser PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
target_link_libraries(
|
||||
configparser
|
||||
PRIVATE
|
||||
rust_configparser
|
||||
Folly::folly
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS configparser
|
||||
EXPORT mercurial
|
||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
PUBLIC_HEADER DESTINATION "include/scm/hg/lib/configparser/"
|
||||
)
|
@ -22,3 +22,6 @@ tempdir = "0.3.7"
|
||||
[[bench]]
|
||||
name = "bench"
|
||||
harness = false
|
||||
|
||||
[lib]
|
||||
crate-type = ["staticlib", "lib"]
|
||||
|
Loading…
Reference in New Issue
Block a user