Commit f587dfe9 authored by Ghislain MARY's avatar Ghislain MARY

Fix detection of antlr3 when building with CMake.

parent 39044153
...@@ -45,6 +45,7 @@ include(CheckIncludeFile) ...@@ -45,6 +45,7 @@ include(CheckIncludeFile)
include(CheckLibraryExists) include(CheckLibraryExists)
include(CheckSymbolExists) include(CheckSymbolExists)
include(CheckCSourceCompiles) include(CheckCSourceCompiles)
include(CMakePushCheckState)
set(MSVC_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/MSVC") set(MSVC_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/MSVC")
if(MSVC) if(MSVC)
...@@ -81,13 +82,11 @@ endif() ...@@ -81,13 +82,11 @@ endif()
find_package(Threads) find_package(Threads)
find_package(Antlr3 REQUIRED) find_package(Antlr3 REQUIRED)
if(ANTLR3C_FOUND) cmake_push_check_state(RESET)
cmake_push_check_state(RESET) set(CMAKE_REQUIRED_INCLUDES ${ANTLR3C_INCLUDE_DIRS})
set(CMAKE_REQUIRED_INCLUDES ${ANTLR3C_INCLUDE_DIRS}) set(CMAKE_REQUIRED_LIBRARIES ${ANTLR3C_LIBRARIES})
set(CMAKE_REQUIRED_LIBRARIES ${ANTLR3C_LIBRARIES}) check_symbol_exists("antlr3StringStreamNew" "antlr3.h" HAVE_ANTLR_STRING_STREAM_NEW)
check_symbol_exists("antlr3StringStreamNew" "antlr3.h" HAVE_ANTLR_STRING_STREAM_NEW) cmake_pop_check_state()
cmake_pop_check_state()
endif()
if(ENABLE_TLS) if(ENABLE_TLS)
find_package(PolarSSL REQUIRED) find_package(PolarSSL REQUIRED)
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
# #
# - Find the antlr3c include file and library and antlr.jar # - Find the antlr3c include file and library and antlr.jar
# #
# ANTLR3C_FOUND - system has antlr3c # ANTLR3_FOUND - system has antlr3c
# ANTLR3C_INCLUDE_DIR - the antlr3c include directory # ANTLR3C_INCLUDE_DIR - the antlr3c include directory
# ANTLR3C_LIBRARIES - The libraries needed to use antlr3c # ANTLR3C_LIBRARIES - The libraries needed to use antlr3c
# ANTLR3_COMMAND - The command to run the antlr jar # ANTLR3_COMMAND - The command to run the antlr jar
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment