diff --git a/.gitignore b/.gitignore index ffd2eda..7396623 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ test/iterate test/case test/custom /tmp/ +/build diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e8be20..35ef639 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,11 +15,19 @@ set(SO_PATCH 1) option(UTF8PROC_INSTALL "Enable installation of utf8proc" On) -add_library (utf8proc +set(UTF8PROC_FILES utf8proc.c utf8proc.h ) +if (BUILD_SHARED_LIBS AND MSVC) + set(UTF8PROC_WINDLL_SRCS + win32/utf8proc.rc + ) +endif () + +add_library (utf8proc ${UTF8PROC_FILES} ${UTF8PROC_WINDLL_SRCS}) + # expose header path, for when this is part of a larger cmake project target_include_directories(utf8proc PUBLIC ../utf8proc) diff --git a/utf8proc.h b/utf8proc.h index 490200f..3affa7a 100644 --- a/utf8proc.h +++ b/utf8proc.h @@ -75,6 +75,7 @@ /** The PATCH version (increased for fixes that do not change the API). */ #define UTF8PROC_VERSION_PATCH 0 /** @} */ +#define UTF8PROC_VERSION_NUMBER "2.4.0\0" #include diff --git a/win32/utf8proc.rc b/win32/utf8proc.rc new file mode 100644 index 0000000..0b57976 --- /dev/null +++ b/win32/utf8proc.rc @@ -0,0 +1,41 @@ +#include +#include "../utf8proc.h" + +#ifdef GCC_WINDRES +VS_VERSION_INFO VERSIONINFO +#else +VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE +#endif + FILEVERSION UTF8PROC_VERSION_MAJOR,UTF8PROC_VERSION_MINOR,UTF8PROC_VERSION_PATCH,0 + PRODUCTVERSION UTF8PROC_VERSION_MAJOR,UTF8PROC_VERSION_MINOR,UTF8PROC_VERSION_PATCH,0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS 1 +#else + FILEFLAGS 0 +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + //language ID = U.S. English, char set = Windows, Multilingual + BEGIN + VALUE "CompanyName", "JuliaStrings\0" + VALUE "FileDescription", "utf8proc library\0" + VALUE "FileVersion", UTF8PROC_VERSION_NUMBER + VALUE "InternalName", "utf8proc.dll\0" + VALUE "LegalCopyright", "(C) Jan Behrens and the rest of the Public Software Group\0" + VALUE "OriginalFilename", "utf8proc.dll\0" + VALUE "ProductName", "utf8proc\0" + VALUE "ProductVersion", UTF8PROC_VERSION_NUMBER + VALUE "Comments", "For more information visit https://github.com/JuliaStrings/utf8proc/\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END