Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ project(tritoncommon LANGUAGES C CXX)
# C++ standard
#
set(TRITON_MIN_CXX_STANDARD 17 CACHE STRING "The minimum C++ standard whose features are requested to build this target.")

set(CMAKE_BUILD_TYPE Release)
#
# Options
#
Expand All @@ -46,7 +46,8 @@ option(TRITON_COMMON_ENABLE_JSON "Build json-related libs" ON)

if(TRITON_COMMON_ENABLE_JSON)
find_package(RapidJSON CONFIG REQUIRED)
message(STATUS "RapidJSON found. Headers: ${RAPIDJSON_INCLUDE_DIRS}")
message(STATUS "RapidJSON found. Headers: ${RapidJSON_INCLUDE_DIRS}")
message(STATUS "RapidJSON version: ${RapidJSON_DIR}")
endif()

set(THREADS_PREFER_PTHREAD_FLAG TRUE)
Expand Down Expand Up @@ -103,9 +104,9 @@ if(TRITON_COMMON_ENABLE_JSON)
triton-common-json
INTERFACE
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:${RAPIDJSON_INCLUDE_DIRS}>
$<INSTALL_INTERFACE:${RapidJSON_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${RAPIDJSON_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${RapidJSON_INCLUDE_DIRS}>
)
endif()

Expand Down Expand Up @@ -140,7 +141,6 @@ if(${TRITON_COMMON_ENABLE_PROTOBUF} OR ${TRITON_COMMON_ENABLE_GRPC})
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
${Protobuf_INCLUDE_DIRS}
)

target_link_libraries(
Expand Down
17 changes: 17 additions & 0 deletions conanfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[requires]
abseil/20230802.1
c-ares/1.34.5
grpc/1.54.3
openssl/3.6.0
protobuf/3.21.12
rapidjson/1.1.0
re2/20230301
zlib/1.3.1


[generators]
CMakeDeps
CMakeToolchain

[layout]
cmake_layout
3 changes: 2 additions & 1 deletion protobuf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ cmake_minimum_required (VERSION 3.31.8)
set(protobuf_MODULE_COMPATIBLE TRUE CACHE BOOL "protobuf_MODULE_COMPATIBLE" FORCE)
find_package(Protobuf CONFIG REQUIRED)
message(STATUS "Using protobuf ${Protobuf_VERSION}")
include_directories(${Protobuf_INCLUDE_DIRS})
message(STATUS "Protobuf includes: ${protobuf_INCLUDE_DIRS}")
include_directories(${protobuf_INCLUDE_DIRS})

if(${TRITON_COMMON_ENABLE_GRPC})
find_package(gRPC CONFIG REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ target_include_directories(
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
PRIVATE
${RAPIDJSON_INCLUDE_DIRS}
${RapidJSON_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
)

Expand Down
5 changes: 4 additions & 1 deletion src/test/triton_json/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ target_link_libraries(
GTest::gtest
GTest::gtest_main)

message(STATUS "CMAKE_TOOLCHAIN_FILE: ${CMAKE_TOOLCHAIN_FILE}")
find_package(RapidJSON CONFIG REQUIRED)
message(STATUS "RapidJSON found. Headers: ${rapidjson_INCLUDE_DIRS}")
target_include_directories(
triton-json-test
PUBLIC
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../../include>
$<BUILD_INTERFACE:${RAPIDJSON_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${RapidJSON_INCLUDE_DIRS}>
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
)
Expand Down
Loading