view uriparser/CMakeLists.txt @ 60:a2be1eba7adb

uriparser: import 0.8.5, close #878 @10m
author David Demelier <markand@malikania.fr>
date Fri, 13 Jul 2018 10:50:43 +0200
parents
children 6b612e43bfee
line wrap: on
line source

#
# CMakeLists.txt -- CMake build system for uriparser
#
# Copyright (c) 2016-2018 David Demelier <markand@malikania.fr>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

cmake_minimum_required(VERSION 3.5)
project(uriparser C)

set(
    HEADERS
    ${uriparser_SOURCE_DIR}/include/uriparser/UriBase.h
    ${uriparser_SOURCE_DIR}/include/uriparser/UriDefsAnsi.h
    ${uriparser_SOURCE_DIR}/include/uriparser/UriDefsConfig.h
    ${uriparser_SOURCE_DIR}/include/uriparser/UriDefsUnicode.h
    ${uriparser_SOURCE_DIR}/include/uriparser/Uri.h
    ${uriparser_SOURCE_DIR}/include/uriparser/UriIp4.h
)

set(
    SOURCES
    ${uriparser_SOURCE_DIR}/src/UriCommon.c
    ${uriparser_SOURCE_DIR}/src/UriCommon.h
    ${uriparser_SOURCE_DIR}/src/UriCompare.c
    ${uriparser_SOURCE_DIR}/src/UriEscape.c
    ${uriparser_SOURCE_DIR}/src/UriFile.c
    ${uriparser_SOURCE_DIR}/src/UriIp4Base.c
    ${uriparser_SOURCE_DIR}/src/UriIp4Base.h
    ${uriparser_SOURCE_DIR}/src/UriIp4.c
    ${uriparser_SOURCE_DIR}/src/UriNormalizeBase.c
    ${uriparser_SOURCE_DIR}/src/UriNormalizeBase.h
    ${uriparser_SOURCE_DIR}/src/UriNormalize.c
    ${uriparser_SOURCE_DIR}/src/UriParseBase.c
    ${uriparser_SOURCE_DIR}/src/UriParseBase.h
    ${uriparser_SOURCE_DIR}/src/UriParse.c
    ${uriparser_SOURCE_DIR}/src/UriQuery.c
    ${uriparser_SOURCE_DIR}/src/UriRecompose.c
    ${uriparser_SOURCE_DIR}/src/UriResolve.c
    ${uriparser_SOURCE_DIR}/src/UriShorten.c
)

add_library(uriparser ${HEADERS} ${SOURCES})

target_include_directories(
    uriparser
    PUBLIC
        $<BUILD_INTERFACE:${uriparser_SOURCE_DIR}/include>
)