Skip to content

Commit f6c58b9

Browse files
author
Andreas Schniertshauer
committed
This solves JuliaLang/utf8proc issue #118 "Missing VERSION_INFO when compiling as Windows DLL" using CMakeHelpsers from https://github.com/halex2005/CMakeHelpers. CMakeHelpers must be place in the same directory as / parallel to utf8proc.
For English resource language you need to replace the following things in the CMakeHelpers/VersionResource.rc file: FILEFLAGSMASK 0x3fL with FILEFLAGSMASK 0x17 LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT with LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT BLOCK "041904b0 with BLOCK "040704b0" VALUE "Translation", 0x419, 1200 with VALUE "Translation", 0x407, 1200
1 parent ffbccf4 commit f6c58b9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ cmake_minimum_required (VERSION 2.8)
22

33
include (utils.cmake)
44

5+
set(HASCMAKEHELPERS EXISTS "${CMAKE_SOURCE_DIR}/../CMakeHelpers/generate_product_version.cmake")
6+
7+
if(${HASCMAKEHELPERS})
8+
include ("${CMAKE_SOURCE_DIR}/../CMakeHelpers/generate_product_version.cmake")
9+
endif ()
10+
511
disallow_intree_builds()
612

713
project (utf8proc C)
@@ -21,9 +27,19 @@ if (NOT MSVC)
2127
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -std=c99 -pedantic -Wall")
2228
endif ()
2329

30+
if(${HASCMAKEHELPERS})
31+
generate_product_version(ProductVersionFiles
32+
NAME utf8proc
33+
VERSION_MAJOR ${SO_MAJOR}
34+
VERSION_MINOR ${SO_MINOR}
35+
VERSION_PATCH ${SO_PATCH}
36+
COMPANY_NAME julialang.org)
37+
endif ()
38+
2439
add_library (utf8proc
2540
utf8proc.c
2641
utf8proc.h
42+
${ProductVersionFiles}
2743
)
2844

2945
set_target_properties (utf8proc PROPERTIES

0 commit comments

Comments
 (0)