mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 09:21:49 +08:00
10 lines
563 B
Plaintext
10 lines
563 B
Plaintext
|
The package avro-cpp can be used from CMake via:
|
||
|
|
||
|
find_path(AVROCPP_INCLUDE_DIR avro/Encoder.hh)
|
||
|
find_library(AVROCPP_LIBRARY_DEBUG avrocpp PATH_SUFFIXES "debug/lib" REQUIRED)
|
||
|
get_filename_component(AVROCPP_ROOT_FIND_DIR ${AVROCPP_INCLUDE_DIR} DIRECTORY)
|
||
|
find_library(AVROCPP_LIBRARY_RELEASE avrocpp PATHS "${AVROCPP_ROOT_FIND_DIR}/lib/" REQUIRED NO_DEFAULT_PATH)
|
||
|
|
||
|
target_include_directories(main PRIVATE "${AVROCPP_INCLUDE_DIR}")
|
||
|
target_link_libraries(main PRIVATE optimized "${AVROCPP_LIBRARY_RELEASE}" debug "${AVROCPP_LIBRARY_DEBUG}")
|