view regexp/CMakeLists.txt @ 37:e5d2d0c9b7b3

build libraries and included mal/sql in the library startup functions
author Niels Nes <niels@cwi.nl>
date Tue, 15 Dec 2020 14:13:55 +0100 (2020-12-15)
parents f712fa63c6cc
children 22b5ec33dd19
line wrap: on
line source
#[[
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0.  If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
#]]

add_library(regexp SHARED)

target_sources(regexp
  PRIVATE
  regexp.c)

target_link_libraries(regexp
  PRIVATE
  MonetDB::monetdb_config_header
  MonetDB::monetdb5
  PCRE::PCRE)

set_target_properties(regexp
  PROPERTIES
  OUTPUT_NAME
  _regexp)

install(FILES
  81_regexp.mal
  DESTINATION
  ${CMAKE_INSTALL_LIBDIR}/monetdb5/autoload)

install(TARGETS
  regexp
  RUNTIME
  DESTINATION ${CMAKE_INSTALL_BINDIR}
  LIBRARY
  DESTINATION ${CMAKE_INSTALL_LIBDIR}/monetdb5)

add_custom_command(OUTPUT README.html
  COMMAND  "rst2html" "-d" "${CMAKE_SOURCE_DIR}/README.rst" "README.html")

add_custom_command(OUTPUT README.pdf
  COMMAND "rst2pdf" "${CMAKE_SOURCE_DIR}/README.rst" "-o" "README.pdf")

add_custom_target(regexp-docs
  DEPENDS
  README.html
  README.pdf
  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})