summarylogtreecommitdiffstats
path: root/mingw-w64-xalan-c-icu-fix-cross-compile.patch
blob: f5394782505e7c60065f5939d996a4b9c9ecdcbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
diff --git a/src/xalanc/Include/XalanVersion.hpp.in b/src/xalanc/Include/XalanVersion.hpp.in
index d0a7d9719..63911ede3 100644
--- a/src/xalanc/Include/XalanVersion.hpp.in
+++ b/src/xalanc/Include/XalanVersion.hpp.in
@@ -26,11 +26,11 @@
 #define XALANVERSION_HEADER_GUARD_1357924680
 
 /// Xalan-C major version.
-#define XALAN_VERSION_MAJOR (@xalan-c_VERSION_MAJOR@)
+#define XALAN_VERSION_MAJOR @xalan-c_VERSION_MAJOR@
 /// Xalan-C minor version.
-#define XALAN_VERSION_MINOR (@xalan-c_VERSION_MINOR@)
+#define XALAN_VERSION_MINOR @xalan-c_VERSION_MINOR@
 /// Xalan-C patch version.
-#define XALAN_VERSION_REVISION (@xalan-c_VERSION_PATCH@)
+#define XALAN_VERSION_REVISION @xalan-c_VERSION_PATCH@
 
 /**
  * Xalan-C++ version represented as a single integer value.
diff --git a/src/xalanc/Utils/CMakeLists.txt b/src/xalanc/Utils/CMakeLists.txt
index dc39ad0c8..e104cd310 100644
--- a/src/xalanc/Utils/CMakeLists.txt
+++ b/src/xalanc/Utils/CMakeLists.txt
@@ -17,35 +17,37 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-set(GEN_SUPPORTDIR "${PROJECT_BINARY_DIR}/src/xalanc/PlatformSupport")
+cmake_path(APPEND PROJECT_BINARY_DIR "src" "xalanc" "PlatformSupport" OUTPUT_VARIABLE GEN_SUPPORTDIR)
 file(MAKE_DIRECTORY "${GEN_SUPPORTDIR}")
 
-set(XSL_NLS_SRC_DIR "${PROJECT_SOURCE_DIR}/src/xalanc/NLS")
-set(XSL_NLS_BIN_DIR "${PROJECT_BINARY_DIR}/src/xalanc/NLS")
-set(XSL_NLS_INC_DIR "${PROJECT_BINARY_DIR}/src/xalanc/NLS/include")
-set(XSL_NLS_GEN_DIR "${PROJECT_BINARY_DIR}/src/xalanc/NLS/gen")
+cmake_path(APPEND PROJECT_SOURCE_DIR "src" "xalanc" "NLS" OUTPUT_VARIABLE XSL_NLS_SRC_DIR)
+cmake_path(APPEND PROJECT_BINARY_DIR "src" "xalanc" "NLS" OUTPUT_VARIABLE XSL_NLS_BIN_DIR)
+cmake_path(APPEND XSL_NLS_BIN_DIR "include" OUTPUT_VARIABLE XSL_NLS_INC_DIR)
+cmake_path(APPEND XSL_NLS_BIN_DIR "gen" OUTPUT_VARIABLE XSL_NLS_GEN_DIR)
 file(MAKE_DIRECTORY "${XSL_NLS_LIB_DIR}")
 file(MAKE_DIRECTORY "${XSL_NLS_GEN_DIR}")
 file(MAKE_DIRECTORY "${XSL_NLS_INC_DIR}")
 
 set(MSGFILENAME XalanMsg_${LOCALE})
 
-set(XLIFF_FILE_NAME ${XSL_NLS_SRC_DIR}/${LOCALE}/${MSGFILENAME}.xlf)
+cmake_path(APPEND XSL_NLS_SRC_DIR "${LOCALE}" "${MSGFILENAME}.xlf" OUTPUT_VARIABLE XLIFF_FILE_NAME)
 
-set(GENMSGINDEX "${XSL_NLS_GEN_DIR}/LocalMsgIndex.hpp")
-set(GENMSGDATA "${XSL_NLS_GEN_DIR}/LocalMsgData.hpp")
-set(INCLUDEMSGDATA "${XSL_NLS_INC_DIR}/LocalMsgData.hpp")
-set(SUPPORTMSGINDEX "${GEN_SUPPORTDIR}/LocalMsgIndex.hpp")
+cmake_path(APPEND XSL_NLS_GEN_DIR "LocalMsgIndex.hpp" OUTPUT_VARIABLE GENMSGINDEX)
+cmake_path(APPEND XSL_NLS_GEN_DIR "LocalMsgData.hpp" OUTPUT_VARIABLE GENMSGDATA)
+cmake_path(APPEND XSL_NLS_INC_DIR "LocalMsgData.hpp" OUTPUT_VARIABLE INCLUDEMSGDATA)
+cmake_path(APPEND GEN_SUPPORTDIR "LocalMsgIndex.hpp" OUTPUT_VARIABLE SUPPORTMSGINDEX)
 
 add_custom_target(locale ALL)
 set_target_properties(locale PROPERTIES FOLDER "Message Library")
 
 if(msgloader STREQUAL "inmemory")
+  cmake_path(RELATIVE_PATH XLIFF_FILE_NAME BASE_DIRECTORY "${XSL_NLS_GEN_DIR}" OUTPUT_VARIABLE XLIFF_RELPATH)
+  
   add_custom_command(
     OUTPUT "${GENMSGINDEX}"
            "${GENMSGDATA}"
-    COMMAND "$<TARGET_FILE:MsgCreator>"
-           "${XLIFF_FILE_NAME}"
+    COMMAND MsgCreator
+           "${XLIFF_RELPATH}"
            -TYPE inmem
            -LOCALE ${LOCALE}
     WORKING_DIRECTORY "${XSL_NLS_GEN_DIR}"