From 5ecfa9da402577529893682242be0e1a601e32d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rados=C5=82aw=20Warzocha?= <radoslaw.warzocha@gmail.com>
Date: Mon, 7 Apr 2014 10:52:50 +0200
Subject: [PATCH] ANTLR linking problem solution (#5297)

---
 CMakeScripts/FindANTLR.cmake | 2 +-
 libwccl/CMakeLists.txt       | 5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/CMakeScripts/FindANTLR.cmake b/CMakeScripts/FindANTLR.cmake
index 7a96424..655e338 100644
--- a/CMakeScripts/FindANTLR.cmake
+++ b/CMakeScripts/FindANTLR.cmake
@@ -21,7 +21,7 @@ else (ANTLR_INCLUDE_DIR AND ANTLR_LIBRARY)
 # Look for the library.
   find_library(
     ANTLR_LIBRARY
-    NAMES antlr
+    NAMES antlr-pic
     DOC "Library to link against for ANTLR")
   mark_as_advanced(ANTLR_LIBRARY)
 
diff --git a/libwccl/CMakeLists.txt b/libwccl/CMakeLists.txt
index 0eb4448..ce7740e 100644
--- a/libwccl/CMakeLists.txt
+++ b/libwccl/CMakeLists.txt
@@ -24,10 +24,8 @@ set(LIBS ${LIBS} ${ICU_LIBRARIES} ${ICU_I18N_LIBRARIES})
 find_package(ANTLR REQUIRED)
 include_directories(${ANTLR_INCLUDE_DIR})
 
-if(WIN32)
 # On UNIX this should be included only in final executables
-	set(LIBS ${LIBS} ${ANTLR_LIBRARY})
-endif(WIN32)
+set(LIBS ${LIBS} ${ANTLR_LIBRARY})
 
 SET(libwccl_STAT_SRC
 	exception.cpp
@@ -186,4 +184,3 @@ set_target_properties(wccl PROPERTIES
 		PATTERN "build" EXCLUDE
 		PATTERN "CMake*" EXCLUDE
 	)
-
-- 
GitLab