From 3602894c8e540b49b6b5b827edd571db994f29d8 Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Sun, 19 Nov 2023 15:43:44 -0300 Subject: [PATCH] build: add include/library directories from VcPkg to the default search paths Enables zero-effort usage of third-party libraries (goal B of #856) --- build-support/custom-modules/ns3-vcpkg-hunter.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-support/custom-modules/ns3-vcpkg-hunter.cmake b/build-support/custom-modules/ns3-vcpkg-hunter.cmake index 64155eca4..093d5eb94 100644 --- a/build-support/custom-modules/ns3-vcpkg-hunter.cmake +++ b/build-support/custom-modules/ns3-vcpkg-hunter.cmake @@ -134,10 +134,12 @@ function(setup_vcpkg) execute_process(COMMAND chmod +x ${VCPKG_DIR}/${VCPKG_EXEC}) endif() + disable_cmake_warnings() set(CMAKE_PREFIX_PATH "${VCPKG_DIR}/installed/${VCPKG_TRIPLET}/;${CMAKE_PREFIX_PATH}" PARENT_SCOPE ) + enable_cmake_warnings() # Install packages in manifest mode if(EXISTS ${VCPKG_MANIFEST}) @@ -195,4 +197,6 @@ endfunction() if(${NS3_VCPKG}) setup_vcpkg() + include_directories(${VCPKG_DIR}/installed/${VCPKG_TRIPLET}/include) + link_directories(${VCPKG_DIR}/installed/${VCPKG_TRIPLET}/lib) endif()