From 5731dace370253eae372694a86012b3be3ff214f Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 21 May 2018 13:28:12 +0200 Subject: [PATCH] CPack: use correct version --- Minetestmapper/CMakeLists.txt | 4 ++++ Minetestmapper/Color.h | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Minetestmapper/CMakeLists.txt b/Minetestmapper/CMakeLists.txt index 77cc7e4..3cdac95 100644 --- a/Minetestmapper/CMakeLists.txt +++ b/Minetestmapper/CMakeLists.txt @@ -100,6 +100,10 @@ target_link_libraries(Minetestmapper ${wingetopt_lib} ${LIBGD_LIBRARY} ${ZLIB_LI set (CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION ".") include (InstallRequiredSystemLibraries) +set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) +set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) +set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) +set(CPACK_PACKAGE_INSTALL_DIRECTORY ${PROJECT_NAME}) include (CPack) set(CPACK_GENERATOR "ZIP") install (TARGETS Minetestmapper RUNTIME DESTINATION ".") diff --git a/Minetestmapper/Color.h b/Minetestmapper/Color.h index 78aeff8..988e38c 100644 --- a/Minetestmapper/Color.h +++ b/Minetestmapper/Color.h @@ -25,9 +25,9 @@ struct ColorEntry { FlagIgnore = 0x01, FlagAir = 0x02, }; - ColorEntry() = default; - ColorEntry(uint8_t r, uint8_t g, uint8_t b, uint8_t a, uint8_t t, uint8_t f) : r(r), g(g), b(b), a(a), t(t), f(f){}; - inline Color to_color() const { return Color(r, g, b, a); } + constexpr ColorEntry() = default; + constexpr ColorEntry(uint8_t r, uint8_t g, uint8_t b, uint8_t a, uint8_t t, uint8_t f) : r(r), g(g), b(b), a(a), t(t), f(f){}; + constexpr Color to_color() const { return Color(r, g, b, a); } uint8_t r{0}; uint8_t g{0}; uint8_t b{0}; @@ -37,7 +37,7 @@ struct ColorEntry { }; struct HeightMapColor { - HeightMapColor(int h0, Color c0, int h1, Color c1) : height{h0, h1}, color{c0, c1} {} + constexpr HeightMapColor(int h0, Color c0, int h1, Color c1) : height{h0, h1}, color{c0, c1} {} int height[2]; Color color[2]; };