Skip to content

Commit

Permalink
less verbose (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
alxvth authored Nov 19, 2024
1 parent 7c2ec76 commit 21fcae5
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
cmake_minimum_required(VERSION 3.17)

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")
if(NOT DEFINED MV_EXAMPLES_USE_VCPKG)
set(MV_EXAMPLES_USE_VCPKG OFF)
elseif(MV_EXAMPLES_USE_VCPKG)
message(STATUS "ExamplePlugins: Using vcpkg to install dependencies")
endif()

# -----------------------------------------------------------------------------
Expand All @@ -11,17 +12,6 @@ endif()
set(PROJECT "ExamplePlugins")
PROJECT(${PROJECT})

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)
add_subdirectory(ExampleViewJS)
add_subdirectory(ExampleViewOpenGL)
Expand Down

0 comments on commit 21fcae5

Please sign in to comment.