From e33d7db123533d6f382d77ff8d7c6c109c35217f Mon Sep 17 00:00:00 2001 From: ju1ce Date: Wed, 13 Jul 2022 15:17:39 +0200 Subject: [PATCH] fixed BridgeDriver overwriting install directory of ATT --- BridgeDriver | 2 +- CMake/shared.cmake | 5 +---- CMakeLists.txt | 4 +++- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/BridgeDriver b/BridgeDriver index 5d84bc5b..8e8d6537 160000 --- a/BridgeDriver +++ b/BridgeDriver @@ -1 +1 @@ -Subproject commit 5d84bc5bd890d22c3b74816aef62f043cdf0254d +Subproject commit 8e8d6537aa93d11bf22bbf7116c480c612f782be diff --git a/CMake/shared.cmake b/CMake/shared.cmake index 23368b86..090d6429 100644 --- a/CMake/shared.cmake +++ b/CMake/shared.cmake @@ -5,10 +5,7 @@ # Fix default install path on windows # Noone wants to provide admin access and install to C:/Program Files (x86)/ -if(WIN32 AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - message(WARNING "On Windows the default install destination is ${CMAKE_INSTALL_PREFIX}, \ -which requires admin rights and usually results in errors. \ -Explicitly set with -DCMAKE_INSTALL_PREFIX= to install there.") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/install" CACHE PATH "Install directory." FORCE) message(STATUS "Installing to ${CMAKE_INSTALL_PREFIX}") endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a03332d..e143370f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,6 @@ cmake_minimum_required(VERSION 3.16) set(SUPERPROJECT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") -include("${CMAKE_CURRENT_SOURCE_DIR}/CMake/shared.cmake") include("${CMAKE_CURRENT_SOURCE_DIR}/CMake/helpers.cmake") option(BUILD_SHARED_LIBS "" FALSE) @@ -20,6 +19,9 @@ att_bootstrap_vcpkg() # vcpkg stuff must be done before project project("April-Tag-VR-FullBody-Tracker" CXX) +#shared needs some variables that are only initialized after project +include("${CMAKE_CURRENT_SOURCE_DIR}/CMake/shared.cmake") + if (MSVC) if (BUILD_SHARED_LIBS) att_crt_linkage(SHARED)