HowardHinnant / date

A date and time library based on the C++11/14/17 <chrono> header
Other
3.13k stars 673 forks source link

CMake issue - add possiility to specify INSTALL location, not only . #618

Open derived-coder opened 3 years ago

derived-coder commented 3 years ago

it is not possible atm to specify some custom dir for the INSTALL define via CMake. Atm INSTALL will always be set to . which is not reflecting all use cases obviously.

Please make it possible to specify the INSTALL location of the iana database via CMake.

connorjak commented 3 years ago

This is already possible if you #define the INSTALL macro before you #include "date/tz.h". You can also use a CMake function to declare that variable as well in your own CMakeLists.txt.

Are you asking for that variable to be exposed in date's CMakeLists.txt like the other options?

Edit: I spoke too soon; the INSTALL macro is local to tz.cpp; it's required on compile time of the date library. I'll make a PR enabling this functionality.