Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More robust no vcpkg option #33

Merged
merged 1 commit into from
Nov 7, 2024
Merged
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
13 changes: 9 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
cmake_minimum_required(VERSION 3.17)

set(MV_EXAMPLES_USE_VCPKG OFF)
if(DEFINED CMAKE_TOOLCHAIN_FILE AND CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg")
set(MV_EXAMPLES_USE_VCPKG ON)
set(VCPKG_LIBRARY_LINKAGE "dynamic" CACHE STRING "Link vcpkg libraries dynamically")
Expand All @@ -12,9 +11,15 @@ endif()
set(PROJECT "ExamplePlugins")
PROJECT(${PROJECT})

# vcpkg is used together with conan on ci
if(DEFINED VCPKG_TARGET_TRIPLET)
set(MV_EXAMPLES_USE_VCPKG ON)
if(DEFINED MV_EXAMPLES_USE_VCPKG AND NOT MV_EXAMPLES_USE_VCPKG)
# vcpkg is used together with conan on ci
if(DEFINED VCPKG_TARGET_TRIPLET)
set(MV_EXAMPLES_USE_VCPKG ON)
else()
set(MV_EXAMPLES_USE_VCPKG OFF)
endif()
else()
set(MV_EXAMPLES_USE_VCPKG OFF)
endif()

add_subdirectory(ExampleView)
Expand Down