Browse Source
We've also solved several issues related to Linux/Windows build errors. The CMake script can generate the amalgamation distribution, and we can choose whether to use the amalgamation or not.pull/31/head
Tom G. Huang
6 years ago
5 changed files with 139 additions and 112 deletions
@ -1,38 +0,0 @@ |
|||
################################################################################ |
|||
# This file is part of the argtable3 library. |
|||
# |
|||
# Copyright (C) 2018 Tom G. Huang |
|||
# <tomghuang@gmail.com> |
|||
# All rights reserved. |
|||
# |
|||
# Redistribution and use in source and binary forms, with or without |
|||
# modification, are permitted provided that the following conditions are met: |
|||
# * Redistributions of source code must retain the above copyright |
|||
# notice, this list of conditions and the following disclaimer. |
|||
# * Redistributions in binary form must reproduce the above copyright |
|||
# notice, this list of conditions and the following disclaimer in the |
|||
# documentation and/or other materials provided with the distribution. |
|||
# * Neither the name of STEWART HEITMANN nor the names of its contributors |
|||
# may be used to endorse or promote products derived from this software |
|||
# without specific prior written permission. |
|||
# |
|||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
|||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
|||
# ARE DISCLAIMED. IN NO EVENT SHALL STEWART HEITMANN BE LIABLE FOR ANY DIRECT, |
|||
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
|||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
|||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
|||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|||
################################################################################ |
|||
|
|||
cmake_minimum_required(VERSION 3.0) |
|||
|
|||
project(ArgTable3Sample) |
|||
|
|||
find_package(argtable3 REQUIRED) |
|||
|
|||
add_executable(testargtable3 testargtable3.c) |
|||
target_link_libraries(testargtable3 argtable3) |
@ -1,7 +1,36 @@ |
|||
add_library(argtable3 argtable3.c) |
|||
target_include_directories(argtable3 PUBLIC |
|||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}> |
|||
$<INSTALL_INTERFACE:include> |
|||
) |
|||
install(TARGETS argtable3 EXPORT ${PROJECT_NAME}-config DESTINATION lib) |
|||
install(FILES "${CMAKE_CURRENT_LIST_DIR}/argtable3.h" DESTINATION include) |
|||
################################################################################ |
|||
# This file is part of the argtable3 library. |
|||
# |
|||
# Copyright (C) 2016-2019 Tom G. Huang |
|||
# <tomghuang@gmail.com> |
|||
# All rights reserved. |
|||
# |
|||
# Redistribution and use in source and binary forms, with or without |
|||
# modification, are permitted provided that the following conditions are met: |
|||
# * Redistributions of source code must retain the above copyright |
|||
# notice, this list of conditions and the following disclaimer. |
|||
# * Redistributions in binary form must reproduce the above copyright |
|||
# notice, this list of conditions and the following disclaimer in the |
|||
# documentation and/or other materials provided with the distribution. |
|||
# * Neither the name of STEWART HEITMANN nor the names of its contributors |
|||
# may be used to endorse or promote products derived from this software |
|||
# without specific prior written permission. |
|||
# |
|||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
|||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
|||
# ARE DISCLAIMED. IN NO EVENT SHALL STEWART HEITMANN BE LIABLE FOR ANY DIRECT, |
|||
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
|||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
|||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
|||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|||
################################################################################ |
|||
|
|||
add_library(argtable3 SHARED ${ARGTABLE3_SRC_FILES}) |
|||
target_include_directories(argtable3 PRIVATE ${CMAKE_SOURCE_DIR}/src) |
|||
|
|||
install(TARGETS argtable3 EXPORT ${ARGTABLE3_PACKAGE_NAME}Config DESTINATION ${ARGTABLE3_INSTALL_LIBDIR}) |
|||
install(FILES "${CMAKE_CURRENT_LIST_DIR}/argtable3.h" DESTINATION ${ARGTABLE3_INSTALL_INCLUDEDIR}) |
|||
install(EXPORT ${ARGTABLE3_PACKAGE_NAME}Config DESTINATION ${ARGTABLE3_INSTALL_CMAKEDIR}) |
|||
|
Loading…
Reference in new issue