Skip to content

Commit

Permalink
use same logic for all enables: if on, then package is required
Browse files Browse the repository at this point in the history
  • Loading branch information
cenit committed Feb 20, 2021
1 parent b9d296e commit fd6ea9b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
with:
setupOnly: true
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgGitCommitId: '865de0c130f3d34174ac7a410789df3c44a27fd2'
vcpkgGitCommitId: '99dc49dae7e170c3be63dd097230007f3bb73c4f'
appendedCacheKey: ${{ hashFiles( '**/vcpkg.json' ) }}
vcpkgTriplet: 'x64-linux'
additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed
Expand Down Expand Up @@ -284,7 +284,7 @@ jobs:
with:
setupOnly: true
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgGitCommitId: '865de0c130f3d34174ac7a410789df3c44a27fd2'
vcpkgGitCommitId: '99dc49dae7e170c3be63dd097230007f3bb73c4f'
appendedCacheKey: ${{ hashFiles( '**/vcpkg.json' ) }}
vcpkgTriplet: 'x64-osx'
additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed
Expand Down Expand Up @@ -388,7 +388,7 @@ jobs:
with:
setupOnly: true
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgGitCommitId: '865de0c130f3d34174ac7a410789df3c44a27fd2'
vcpkgGitCommitId: '99dc49dae7e170c3be63dd097230007f3bb73c4f'
appendedCacheKey: ${{ hashFiles( '**/vcpkg.json' ) }}
vcpkgTriplet: 'x64-windows'
additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed
Expand Down
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ if(ENABLE_VCPKG_INTEGRATION AND DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TO
set(USE_INTEGRATED_LIBS "FALSE" CACHE BOOL "Use libs distributed with this repo")
elseif(DEFINED CMAKE_TOOLCHAIN_FILE)
message(STATUS "Using toolchain: ${CMAKE_TOOLCHAIN_FILE}")
if(CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg.cmake")
message(STATUS "Toolchain uses VCPKG integration")
message(STATUS "VCPKG_MANIFEST_FEATURES: ${VCPKG_MANIFEST_FEATURES}")
endif()
set(USE_INTEGRATED_LIBS "FALSE" CACHE BOOL "Use libs distributed with this repo")
elseif(WIN32)
message(STATUS "vcpkg not found, toolchain not defined, using integrated libs on win32")
Expand Down Expand Up @@ -153,7 +157,7 @@ if(MSVC)
find_package(PThreads_windows REQUIRED)
endif()
if(ENABLE_OPENCV)
find_package(OpenCV)
find_package(OpenCV REQUIRED)
if(OpenCV_FOUND)
if(SELECT_OPENCV_MODULES)
if(TARGET opencv_world)
Expand Down Expand Up @@ -240,7 +244,7 @@ if(OpenCV_FOUND)
endif()

if(ENABLE_CUDA AND ENABLE_CUDNN)
find_package(CUDNN)
find_package(CUDNN REQUIRED)
endif()

if(ENABLE_CUDA)
Expand Down

0 comments on commit fd6ea9b

Please sign in to comment.