From 61f308fb0363e8988e2b64858e63d11ddbb0282b Mon Sep 17 00:00:00 2001 From: Michael Ochmann Date: Sat, 25 Feb 2023 20:10:51 +0100 Subject: [PATCH] fixed `ARCH` detection in `cmake` --- CMakeLists.txt | 14 +++++++------- main.cpp | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e8c22cc..9f4c6e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,12 @@ cmake_minimum_required(VERSION 3.14...3.25) set (CXX_STANDARD 23) +project( + qr + VERSION 1.1.0 + LANGUAGES CXX +) + if (DEFINED ENV{ARCH}) set(ARCH $ENV{ARCH}) else() @@ -10,12 +16,6 @@ endif() set(EXE_NAME "qr_${CMAKE_PROJECT_VERSION}-${ARCH}") -project( - qr - VERSION 1.1.0 - LANGUAGES CXX -) - message(STATUS "ARCH:: ${ARCH}") configure_file(main.cpp main_substitute.cpp) @@ -36,4 +36,4 @@ add_custom_command( install(TARGETS qr RUNTIME DESTINATION bin) install(PROGRAMS build/${EXE_NAME} DESTINATION bin RENAME qr) -install(FILES build/qr.7.gz DESTINATION /usr/local/share/man/man7/) \ No newline at end of file +install(FILES build/qr.7.gz DESTINATION /usr/local/share/man/man7/) diff --git a/main.cpp b/main.cpp index baa1fc6..f2883ae 100644 --- a/main.cpp +++ b/main.cpp @@ -180,4 +180,4 @@ int main(int argc, char* argv[]) { qr->render(format); return 0; -} \ No newline at end of file +}