From 9231fff8c954333626efaeda0a5f811e3e4da7bb Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Fri, 19 Jan 2024 21:19:40 -0500 Subject: [PATCH] cmake: Allow specifying TZDB2NX_VERSION without other requirements I was worried the version and custom zoneinfo dir were tied together, but it's fine. We can override the version whenever we want. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a02a73f..ad64710 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,8 +5,8 @@ project(tzdb2nx VERSION 1.0) option(TZDB2NX_ZONEINFO_DIR "Specify a custom zoneinfo directory containing time zone data you wish to use" "") option(TZDB2NX_VERSION "Specify a custom zoneinfo version with the directory" "") -if ((TZDB2NX_ZONEINFO_DIR AND NOT TZDB2NX_VERSION) OR (TZDB2NX_VERSION AND NOT TZDB2NX_ZONEINFO_DIR)) - message(FATAL_ERROR "Either TZDB2NX_ZONEINFO_DIR or TZDB2NX_VERSION but not both were defined.") +if (TZDB2NX_ZONEINFO_DIR AND NOT TZDB2NX_VERSION) + message(FATAL_ERROR "TZDB2NX_ZONEINFO_DIR was specified but TZDB2NX_VERSION was left undefined.") endif() set(CMAKE_CXX_STANDARD 20)