src/CMakeLists.txt
author František Kučera <franta-hg@frantovo.cz>
Fri, 31 Jul 2020 00:07:04 +0200
branchv_0
changeset 29 509cac0cf411
parent 23 47a7d86ad810
permissions -rw-r--r--
xslt: relpipe-out-xhtml: customizable strings and CSS This commands now accepts following parameters: --title --css-appendix --description --record-count-prefix --record-count-suffix --relation-name-prefix --relation-name-suffix and allows to customize (e.g. localize) the XHTML output or override CSS rules by providing own. Attribute names, types and record counts have CSS classes and can be styled or (visually) removed.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
# Relational pipes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
# Copyright © 2018 František Kučera (Frantovo.cz, GlobalCode.info)
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
#
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
# This program is free software: you can redistribute it and/or modify
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
# it under the terms of the GNU General Public License as published by
23
47a7d86ad810 fix license version: GNU GPLv3
František Kučera <franta-hg@frantovo.cz>
parents: 13
diff changeset
     6
# the Free Software Foundation, version 3 of the License.
6
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
#
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
# This program is distributed in the hope that it will be useful,
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
# GNU General Public License for more details.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
#
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
# You should have received a copy of the GNU General Public License
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
# along with this program. If not, see <http://www.gnu.org/licenses/>.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
set(EXECUTABLE_FILE "relpipe-out-xml")
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
# Relpipe libraries:
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
INCLUDE(FindPkgConfig)
13
816094aa1fff move common XML code to relpipe-lib-xmlwriter (a header-only library)
František Kučera <franta-hg@frantovo.cz>
parents: 9
diff changeset
    20
pkg_check_modules (RELPIPE_LIBS relpipe-lib-reader.cpp relpipe-lib-cli.cpp relpipe-lib-xmlwriter.cpp)
6
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
include_directories(${RELPIPE_LIBS_INCLUDE_DIRS})
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
link_directories(${RELPIPE_LIBS_LIBRARY_DIRS})
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
# Add ASan AddressSanitizer
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
# From ASan wiki: "To get nicer stack traces in error messages add -fno-omit-frame-pointer."
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
# Executable output:
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
add_executable(
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
	${EXECUTABLE_FILE}
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
	XmlHandler.h
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
	relpipe-out-xml.cpp
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
)
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
# Link libraries:
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    37
target_link_libraries(${EXECUTABLE_FILE} ${RELPIPE_LIBS_LIBRARIES})
9
4477f79ed74c cmake: install
František Kučera <franta-hg@frantovo.cz>
parents: 6
diff changeset
    38
set_property(TARGET ${EXECUTABLE_FILE} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
4477f79ed74c cmake: install
František Kučera <franta-hg@frantovo.cz>
parents: 6
diff changeset
    39
4477f79ed74c cmake: install
František Kučera <franta-hg@frantovo.cz>
parents: 6
diff changeset
    40
install(TARGETS ${EXECUTABLE_FILE} DESTINATION bin)