From 80e45f6d9b5e547d407a4a228291d04396a86316 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 4 Feb 2017 08:25:41 +0100 Subject: [PATCH] Different solution for FGQCanvas install Move the install line back inside the subdir, but pull in the extra config file so the install-bindir is defined. --- CMakeLists.txt | 2 +- utils/CMakeLists.txt | 5 ----- utils/fgqcanvas/CMakeLists.txt | 4 ++++ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a9360647..7742447e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -265,7 +265,7 @@ if (MSVC) if (CRASHRPT_FOUND) set(HAVE_CRASHRPT 1) message(STATUS "Using CrashRpt") - include_directories( ${CRASHRPT_INCLUDE_DIR}) + include_directories( ${CRASHRPT_INCLUDE_DIR}) endif() endif() diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 6e02ce76a..fd4b1bbb7 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -37,9 +37,4 @@ endif() if (ENABLE_FGQCANVAS) add_subdirectory(fgqcanvas) - - if (TARGET fgqcanvas) - # do this here so standalone build of FGQCanvas works - install(TARGETS fgqcanvas RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() endif() diff --git a/utils/fgqcanvas/CMakeLists.txt b/utils/fgqcanvas/CMakeLists.txt index fb75c97ee..ff626cd95 100644 --- a/utils/fgqcanvas/CMakeLists.txt +++ b/utils/fgqcanvas/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.0) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED YES) +include(GNUInstallDirs) + project(FGQCanvas) find_package(Qt5 5.4 COMPONENTS Widgets WebSockets) @@ -55,3 +57,5 @@ target_include_directories(fgqcanvas PRIVATE ${PROJECT_SOURCE_DIR}) # so ui_foo.h files are found target_include_directories(fgqcanvas PRIVATE ${PROJECT_BINARY_DIR}) + +install(TARGETS fgqcanvas RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})