PROJECT( parser )

find_package(Libedit)
if (Libedit_FOUND)
	message(STATUS "Building with libedit")
	add_definitions( -DHAVE_LIBEDIT )
	set(LIBS ${LIBS} ${Libedit_LIBRARIES})
endif (Libedit_FOUND)

find_package(LibXML++ REQUIRED)
include_directories(${LibXML++_INCLUDE_DIRS})
link_directories(${LibXML++_LIBRARY_DIRS})
set(LIBS ${LIBS} ${LibXML++_LIBRARIES})

include_directories( ${CMAKE_SOURCE_DIR} )

add_definitions(-DLIBWCCL_WCCLPARSER_DATA_DIR="${PROJECT_SOURCE_DIR}/")

add_executable(wcclparser
  main.cpp
)
target_link_libraries (wcclparser wccl ${Boost_LIBRARIES} antlr ${LIBS})

# String operator
add_executable(parser-strop
  strop_main.cpp
)
target_link_libraries (parser-strop wccl ${Boost_LIBRARIES} antlr)

# Bool operator
add_executable(parser-boolop
  bool_main.cpp
)
target_link_libraries (parser-boolop wccl ${Boost_LIBRARIES} antlr)

# Tagset operator
add_executable(parser-tagop
  tagset_main.cpp
)
target_link_libraries (parser-tagop wccl ${Boost_LIBRARIES} antlr)

include_directories(${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIRS})

#add_custom_target(test tests)
#add_custom_target(test-verbose ./tests --log_level=message)