From 79bbfb5656b1d49a9421e400cba3b64a50a4ece0 Mon Sep 17 00:00:00 2001 From: "Michael.Wipplinger" <michael.wipplinger@sequality.at> Date: Tue, 24 Sep 2024 20:13:28 +0200 Subject: [PATCH] add a cmakelists.txt --- cpp/CMakeLists.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 cpp/CMakeLists.txt diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt new file mode 100644 index 0000000..05a4228 --- /dev/null +++ b/cpp/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 3.22) + +project(qrcode-generator LANGUAGES CXX VERSION 2.0) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_FLAGS "${CMAXE_CXX_FLAGS} -Wall -Werror") + +add_library(${PROJECT_NAME} STATIC + qrcodegen.hpp + qrcodegen.cpp +) + + +set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION}) + +target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_LIST_DIR}) + +include(GNUInstallDirs) + +install(TARGETS ${PROJECT_NAME} + BUNDLE DESTINATION . + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +)