Newer
Older
ilor
committed
########## libwccl ###############
PROJECT(wccl)
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/include/ )
ilor
committed
find_package(Corpus2 0.1.1 REQUIRED)
ilor
committed
set(LIBS ${LIBS} ${Corpus2_LIBRARY})
ilor
committed
find_package(PwrUtils 0.0.3 REQUIRED)
set(LIBS ${LIBS} ${PwrUtils_LIBRARY})
ilor
committed
link_directories(${Boost_LIBRARY_DIRS})
set(LIBS ${LIBS} ${Boost_LIBRARIES})
find_package(ICU REQUIRED)
include_directories(${ICU_INCLUDE_DIR})
set(LIBS ${LIBS} ${ICU_LIBRARIES} ${ICU_I18N_LIBRARIES})
find_package(ANTLR REQUIRED)
include_directories(${ANTLR_INCLUDE_DIR})
set(LIBS ${LIBS} ${ANTLR_LIBRARY})
ilor
committed
SET(libwccl_STAT_SRC
ops/affix.cpp
ops/formatters.cpp
ops/logicalpredicate.cpp
ops/nor.cpp
ops/or.cpp
ilor
committed
sentencecontext.cpp
values/bool.cpp
values/position.cpp
values/positionref.cpp
ilor
committed
variables.cpp
)
${PROJECT_BINARY_DIR}/parser/ANTLRLexer.cpp
${PROJECT_BINARY_DIR}/parser/ANTLRParser.cpp
include_directories(${PROJECT_BINARY_DIR}/parser)
OUTPUT ${PROJECT_BINARY_DIR}/parser/ANTLRLexer.cpp
${PROJECT_BINARY_DIR}/parser/ANTLRLexer.hpp
${PROJECT_BINARY_DIR}/parser/ANTLRParser.cpp
${PROJECT_BINARY_DIR}/parser/ANTLRParser.hpp
${PROJECT_BINARY_DIR}/parser/ANTLRExprTokenTypes.hpp
${PROJECT_BINARY_DIR}/parser/ANTLRExprTokenTypes.txt
COMMAND runantlr -o parser ${PROJECT_SOURCE_DIR}/parser/grammar.g
DEPENDS ${PROJECT_SOURCE_DIR}/parser/grammar.g
COMMENT "-- Generating ANTLR parser cpp/hpp/txt files")
ilor
committed
file(GLOB_RECURSE INCS "*.h")
add_library(wccl SHARED ${libwccl_STAT_SRC} ${INCS})
ilor
committed
set_target_properties(wccl PROPERTIES
VERSION "${ver_major}.${ver_minor}"
SOVERSION ${ver_major})
if(UNIX)
install(TARGETS wccl
LIBRARY DESTINATION lib
)
install(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DESTINATION include
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
PATTERN "bin" EXCLUDE
PATTERN "build" EXCLUDE
PATTERN "CMake*" EXCLUDE
)
endif(UNIX)