include_directories(.
    ${PROJECT_SOURCE_DIR}/library/base
    ${PROJECT_SOURCE_DIR}/library/grt/src
    ${PROJECT_SOURCE_DIR}/modules
    ${PROJECT_SOURCE_DIR}/generated
    SYSTEM ${GRT_INCLUDE_DIRS}
    SYSTEM ${PCRE_INCLUDE_DIRS}
    SYSTEM ${Boost_INCLUDE_DIRS}
)

add_executable(genwrap
    genwrap.cpp
)

target_compile_options(genwrap PUBLIC ${WB_CXXFLAGS})

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
  target_compile_options(genwrap PRIVATE -fPIE)
else()
  target_compile_options(genwrap PRIVATE -fPIE -pie)
endif()

target_link_libraries(genwrap grt wbbase wbpublic mtemplate ${X11_LIBRARIES} ${PCRE_LIBRARIES} ${MySQL_LIBRARIES})

if(BUILD_FOR_TESTS)
  target_link_libraries(genwrap gcov)
endif()
