From 8cb3fad9b1b20818c4c95c3b74c828d3ec41c350 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 9 Apr 2020 14:05:03 +0200 Subject: [PATCH] gui/CMakeLists.txt: Adding install target --- gui/CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index fc02215..94b0226 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -8,7 +8,9 @@ set( CMAKE_AUTOUIC ON ) # Program # -------------------------------- -set( PROGRAM_EXE ${CMAKE_PROJECT_NAME}-gui ) +set( COMPONENT_NAME ${CMAKE_PROJECT_NAME}-gui) + +set( PROGRAM_EXE ${COMPONENT_NAME} ) set( PROGRAM_SRC main.cpp @@ -20,3 +22,11 @@ add_executable( ${PROGRAM_EXE} ${PROGRAM_SRC} ) # Libraries find_package( Qt5 5.11 COMPONENTS Core Widgets REQUIRED ) target_link_libraries( ${PROGRAM_EXE} Qt5::Core Qt5::Widgets common ) + +# -------------------------------- +# Install +# -------------------------------- + +install(TARGETS ${PROGRAM_EXE} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT ${COMPONENT_NAME})