From d38ebc494a2a1ccf0f568076b25e92deb419660f Mon Sep 17 00:00:00 2001 From: "HARMEL, Bernard" Date: Thu, 14 Mar 2024 18:00:00 +0100 Subject: [PATCH] a --- CMakeLists.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4005b6..0dbeb66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -374,12 +374,14 @@ install(FILES COMPONENT bofstd-devel ) -#list_cmake_vars_containing("") +if (PROJECT_IS_TOP_LEVEL) + set(INSTALL_GTEST OFF) # Add a custom command to run the vcpkg list command during configuration -execute_process( - COMMAND ${CMAKE_COMMAND} -E env vcpkg list --x-install-root=./vcpkg_installed - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} # Change to your desired working directory - OUTPUT_VARIABLE DepVcpkg -) -file(APPEND ${CMAKE_BINARY_DIR}/DepManifest.txt "Vcpkg Dependencies for ${PROJECT_NAME}:\n") -file(APPEND ${CMAKE_BINARY_DIR}/DepManifest.txt "${DepVcpkg}") \ No newline at end of file + execute_process( + COMMAND ${CMAKE_COMMAND} -E env vcpkg list --x-install-root=./vcpkg_installed + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} # Change to your desired working directory + OUTPUT_VARIABLE DepVcpkg + ) + file(APPEND ${CMAKE_BINARY_DIR}/DepManifest.txt "Vcpkg Dependencies for ${PROJECT_NAME}:\n") + file(APPEND ${CMAKE_BINARY_DIR}/DepManifest.txt "${DepVcpkg}") +endif() \ No newline at end of file