view reverse/CMakeLists.txt @ 34:f712fa63c6cc

add cmake files
author Niels Nes <niels@cwi.nl>
date Fri, 12 Jun 2020 09:07:27 +0200 (2020-06-12)
parents
children e5d2d0c9b7b3
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(reverse SHARED)

target_sources(reverse
  PRIVATE
  reverse.c)

target_link_libraries(reverse
  PRIVATE
  MonetDB::monetdb_config_header
  MonetDB::monetdb5)

set_target_properties(reverse
  PROPERTIES
  OUTPUT_NAME
  _reverse)

install(FILES
  80_reverse.mal
  DESTINATION
  ${CMAKE_INSTALL_LIBDIR}/monetdb5/autoload)

install(FILES
  80_regexp.sql
  DESTINATION ${CMAKE_INSTALL_LIBDIR}/monetdb5/createdb)

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(reverse-docs
  DEPENDS
  README.html
  README.pdf
  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})