Browse Source

CMake: Add installation of the program binary

master
Riyyi 3 years ago
parent
commit
3c1f55768f
  1. 7
      CMakeLists.txt

7
CMakeLists.txt

@ -9,6 +9,9 @@ set(PROJECT "stowage")
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(${PROJECT} CXX)
set(CMAKE_INSTALL_PREFIX /usr)
include(GNUInstallDirs)
# ------------------------------------------
# Setup C++ compiler
@ -71,6 +74,10 @@ list(REMOVE_ITEM TEST_SOURCES "${CMAKE_SOURCE_DIR}/src/main.cpp")
add_executable(${PROJECT} ${PROJECT_SOURCES})
target_link_libraries(${PROJECT})
install(TARGETS ${PROJECT}
DESTINATION ${CMAKE_INSTALL_BINDIR}
CONFIGURATIONS Release)
# ------------------------------------------
# Execute target

Loading…
Cancel
Save