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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
This file is part of MXE.
See index.html for further information.
From 1a7959cf317dcb06db55dc44cdf58c89ee223321 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Mon, 12 Nov 2012 12:28:25 +0100
Subject: [PATCH 1/2] disable shared libs (MXE-specific)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b9e221..2ca9f1e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,21 +86,6 @@ IF(UNIX AND NOT APPLE AND NOT CMAKE_CROSSCOMPILING AND NOT EXISTS "/etc/debian_v
ENDIF()
ENDIF()
-# Shared library
-ADD_LIBRARY(
- ${VMIME_LIBRARY_NAME}
- SHARED
- ${VMIME_LIBRARY_SRC_FILES}
- ${VMIME_LIBRARY_INCLUDE_FILES}
-)
-
-SET_TARGET_PROPERTIES(
- ${VMIME_LIBRARY_NAME}
- PROPERTIES
- VERSION "${VMIME_VERSION}"
- SOVERSION "${VMIME_API_VERSION}"
-)
-
# Static library
#
# Note: cannot have two targets with the same name so the static version has
@@ -120,19 +105,12 @@ SET_TARGET_PROPERTIES(
# These next two lines are required but it is unclear exactly what they do.
# The CMake FAQ mentions they are necessary and it does not work otherwise.
-SET_TARGET_PROPERTIES(${VMIME_LIBRARY_NAME} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
SET_TARGET_PROPERTIES(${VMIME_LIBRARY_NAME}-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries")
# Installation of libraries
INSTALL(
- TARGETS ${VMIME_LIBRARY_NAME}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT sharedlibs
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT sharedlibs
-)
-
-INSTALL(
TARGETS ${VMIME_LIBRARY_NAME}-static
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT staticlibs
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT staticlibs
@@ -220,11 +198,7 @@ SET(CPACK_SOURCE_IGNORE_FILES "\\\\.git;~$;build/")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION})
# Set components
-SET(CPACK_COMPONENTS_ALL sharedlibs staticlibs headers)
-
-SET(CPACK_COMPONENT_SHAREDLIBS_DISPLAY_NAME "Shared libraries")
-SET(CPACK_COMPONENT_SHAREDLIBS_DESCRIPTION
- "Shared library for general use.")
+SET(CPACK_COMPONENTS_ALL staticlibs headers)
SET(CPACK_COMPONENT_STATICLIBS_DISPLAY_NAME "Static libraries")
SET(CPACK_COMPONENT_STATICLIBS_DESCRIPTION
@@ -234,7 +208,6 @@ SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ Headers")
SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
"C/C++ header files.")
-SET(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development")
SET(CPACK_COMPONENT_STATICLIBS_GROUP "Development")
SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION "")
@@ -438,12 +411,6 @@ IF(VMIME_HAVE_SASL_SUPPORT)
${GSASL_INCLUDE_DIR}
)
- TARGET_LINK_LIBRARIES(
- ${VMIME_LIBRARY_NAME}
- ${TARGET_LINK_LIBRARIES}
- ${GSASL_LIBRARIES}
- )
-
SET(VMIME_PKGCONFIG_LIBS "${VMIME_PKGCONFIG_LIBS} ${GSASL_LIBRARIES}")
SET(VMIME_PKGCONFIG_CFLAGS "${VMIME_PKGCONFIG_CFLAGS} ${GSASL_INCLUDE_DIR}")
SET(VMIME_PKGCONFIG_REQUIRES "${VMIME_PKGCONFIG_REQUIRES} libgsasl")
@@ -493,12 +460,6 @@ IF(VMIME_HAVE_TLS_SUPPORT)
${GNUTLS_LIBRARY_DIRS}
)
- TARGET_LINK_LIBRARIES(
- ${VMIME_LIBRARY_NAME}
- ${TARGET_LINK_LIBRARIES}
- ${GNUTLS_LIBRARY}
- )
-
SET(VMIME_PKGCONFIG_LIBS "${VMIME_PKGCONFIG_LIBS} ${GNUTLS_LIBRARY_DIRS} ${GNUTLS_LIBRARY}")
SET(VMIME_PKGCONFIG_CFLAGS "${VMIME_PKGCONFIG_CFLAGS} ${GNUTLS_INCLUDE_DIR}")
SET(VMIME_PKGCONFIG_REQUIRES "${VMIME_PKGCONFIG_REQUIRES} libgnutls")
@@ -510,12 +471,6 @@ IF(VMIME_HAVE_TLS_SUPPORT)
${OPENSSL_INCLUDE_DIR}
)
- TARGET_LINK_LIBRARIES(
- ${VMIME_LIBRARY_NAME}
- ${TARGET_LINK_LIBRARIES}
- ${OPENSSL_LIBRARIES}
- )
-
SET(VMIME_PKGCONFIG_LIBS "${VMIME_PKGCONFIG_LIBS} ${OPENSSL_LIBRARIES}")
SET(VMIME_PKGCONFIG_CFLAGS "${VMIME_PKGCONFIG_CFLAGS} ${OPENSSL_INCLUDE_DIR}")
SET(VMIME_PKGCONFIG_REQUIRES "${VMIME_PKGCONFIG_REQUIRES} libopenssl")
@@ -539,12 +494,6 @@ INCLUDE_DIRECTORIES(
${ICONV_INCLUDE_DIR}
)
-TARGET_LINK_LIBRARIES(
- ${VMIME_LIBRARY_NAME}
- ${TARGET_LINK_LIBRARIES}
- ${ICONV_LIBRARIES}
-)
-
##############################################################################
# Platform
--
1.7.10.4
From 2484acc9f40d72d7dc09e6115c9a2a93eb1c41e6 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Mon, 12 Nov 2012 13:58:12 +0100
Subject: [PATCH 2/2] add private dependencies to .pc file (MXE-specific)
diff --git a/libvmime.pc.in b/libvmime.pc.in
index 5745c52..d9e153f 100644
--- a/libvmime.pc.in
+++ b/libvmime.pc.in
@@ -7,6 +7,8 @@ Name: @VMIME_LIBRARY_NAME@
Description: @VMIME_PACKAGE_DESCRIPTION@
Version: @VMIME_PACKAGE_VERSION@
Requires: @VMIME_PKGCONFIG_REQUIRES@
+Requires.private: gnutls libgsasl
Libs: -L${libdir} -lvmime @VMIME_PKGCONFIG_LIBS@
+Libs.private: -liconv -lws2_32
Cflags: -I${includedir}/ @VMIME_PKGCONFIG_CFLAGS@
--
1.7.10.4
|