Fix freebsd unbundled build

This commit is contained in:
proller 2018-01-23 03:09:09 +03:00
parent 88d1f1393a
commit 05b203574a
2 changed files with 11 additions and 2 deletions

View File

@ -8,7 +8,7 @@ endif ()
if (NOT USE_INTERNAL_CCTZ_LIBRARY)
find_library (CCTZ_LIBRARY cctz)
find_path (CCTZ_INCLUDE_DIR NAMES cctz/civil_time.h PATHS ${CCTZ_INCLUDE_PATHS})
find_path (CCTZ_INCLUDE_DIR NAMES cctz/civil_time.h civil_time.h PATHS ${CCTZ_INCLUDE_PATHS})
endif ()
if (CCTZ_LIBRARY AND CCTZ_INCLUDE_DIR)

View File

@ -1,5 +1,14 @@
#include <cctz/civil_time.h>
#if __has_include(<cctz/civil_time.h>)
#include <cctz/civil_time.h> // bundled, debian
#else
#include <civil_time.h> // freebsd
#endif
#if __has_include(<cctz/time_zone.h>)
#include <cctz/time_zone.h>
#else
#include <time_zone.h>
#endif
#include <common/DateLUTImpl.h>
#include <Poco/Exception.h>