From 0ccff5f7af1c1ba6fd398846376dffd8b37375b7 Mon Sep 17 00:00:00 2001 From: Joose Sainio Date: Tue, 2 Jan 2024 14:59:01 +0200 Subject: [PATCH] Fix couple of small issues on rebase --- CMakeLists.txt | 9 +++++++++ README.md | 2 +- src/version.h.in | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index efcdafc2..caeea117 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,14 @@ option(BUILD_SHARED_LIBS "Build using shared kvazaar library" ON) option(BUILD_TESTS "Build tests" ON) + +include(GNUInstallDirs) #Helps to define correct distro specific install directories + +set(KVAZAAR_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}" CACHE PATH "kvazaar library install path") +set(KVAZAAR_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH "kvazaar binary install path") +set(KVAZAAR_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}" CACHE PATH "kvazaar include install path") +set(KVAZAAR_INSTALL_MANDIR "${CMAKE_INSTALL_MANDIR}/man1" CACHE PATH "kvazaar manual page file install path") + # https://www.kitware.com/cmake-and-the-default-build-type/ # Set a default build type if none was specified set(KVZ_DEFAULT_BUILD_TYPE "RelWithDebInfo") @@ -156,6 +164,7 @@ if(MSVC) target_include_directories(kvazaar PUBLIC src/threadwrapper/include) set_property( SOURCE ${LIB_SOURCES_STRATEGIES_AVX2} APPEND PROPERTY COMPILE_FLAGS "/arch:AVX2" ) else() + set_target_properties(kvazaar-bin PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src) list(APPEND ALLOW_AVX2 "x86_64" "AMD64") if(${CMAKE_SYSTEM_PROCESSOR} IN_LIST ALLOW_AVX2) set_property( SOURCE ${LIB_SOURCES_STRATEGIES_AVX2} APPEND PROPERTY COMPILE_FLAGS "-mavx2 -mbmi -mpopcnt -mlzcnt -mbmi2" ) diff --git a/README.md b/README.md index ea4b0342..5f08e524 100644 --- a/README.md +++ b/README.md @@ -446,7 +446,7 @@ It is recommended to use Clang instead of GCC in MinGW environments. GCC also wo to build Kvazaar using Clang. ### CMake -Depending on the platform, some additional tools are required for compiling Kvazzar with CMake. +Depending on the platform, some additional tools are required for compiling Kvazaar with CMake. For Ubuntu, the required packages are `build-essential cmake`. diff --git a/src/version.h.in b/src/version.h.in index 431aef2f..d36ba1ba 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -34,4 +34,6 @@ #ifndef KVZ_VERSION #define KVZ_VERSION @PROJECT_VERSION@ #endif +#define KVZ_COMPILER_STRING "@KVZ_COMPILER_STRING@" +#define KVZ_COMPILE_DATE "@CMAKE_BUILD_DATE@" #define VERSION_STRING QUOTE_EXPAND(KVZ_VERSION)