aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2016-04-10 17:16:44 +0000
committerVincent Richard <[email protected]>2016-04-10 17:16:44 +0000
commit87b052588bdd40803778f5a775a09ad7b505501a (patch)
tree904a549a30ec2b3373da09e7797f2c5093f8ce25
parentFixed 'portStr' not a std::string anymore. (diff)
downloadvmime-87b052588bdd40803778f5a775a09ad7b505501a.tar.gz
vmime-87b052588bdd40803778f5a775a09ad7b505501a.zip
Link with 'anl' only when building shared lib.
-rw-r--r--CMakeLists.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4b5231e6..aaec1d15 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1012,11 +1012,13 @@ LIST(APPEND CMAKE_REQUIRED_LIBRARIES anl)
CHECK_SYMBOL_EXISTS(getaddrinfo_a netdb.h VMIME_HAVE_GETADDRINFO_A)
IF(VMIME_HAVE_GETADDRINFO_A)
- TARGET_LINK_LIBRARIES(
- ${VMIME_LIBRARY_NAME}
- ${TARGET_LINK_LIBRARIES}
- anl
- )
+ IF(VMIME_BUILD_SHARED_LIBRARY)
+ TARGET_LINK_LIBRARIES(
+ ${VMIME_LIBRARY_NAME}
+ ${TARGET_LINK_LIBRARIES}
+ anl
+ )
+ ENDIF()
ENDIF()