-
-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright (c) 2023-present The Bitcoin Core developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or https://opensource.org/license/mit/. | ||
|
||
add_library(univalue STATIC EXCLUDE_FROM_ALL | ||
lib/univalue.cpp | ||
lib/univalue_get.cpp | ||
lib/univalue_read.cpp | ||
lib/univalue_write.cpp | ||
) | ||
target_include_directories(univalue | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
) | ||
target_link_libraries(univalue PRIVATE core_interface) | ||
|
||
if(BUILD_TESTS) | ||
add_executable(unitester test/unitester.cpp) | ||
target_compile_definitions(unitester | ||
PRIVATE | ||
JSON_TEST_SRC=\"${CMAKE_CURRENT_SOURCE_DIR}/test\" | ||
) | ||
target_link_libraries(unitester | ||
PRIVATE | ||
core_interface | ||
univalue | ||
) | ||
add_test(NAME univalue_test | ||
COMMAND unitester | ||
) | ||
|
||
add_executable(object test/object.cpp) | ||
target_link_libraries(object | ||
PRIVATE | ||
core_interface | ||
univalue | ||
) | ||
add_test(NAME univalue_object_test | ||
COMMAND object | ||
) | ||
endif() |