Browse Source

完善install 规则

添加tinyxml库到3rd目录
main
郑敬润 1 year ago
parent
commit
96bfce3f4c
  1. BIN
      3rd/tinyxml-x64/debug/lib/tinyxml.lib
  2. 1811
      3rd/tinyxml-x64/include/tinyxml.h
  3. 42
      3rd/tinyxml-x64/include/tinyxml_export.h
  4. BIN
      3rd/tinyxml-x64/lib/tinyxml.lib
  5. 20
      3rd/tinyxml-x64/share/tinyxml/copyright
  6. 8
      3rd/tinyxml-x64/share/tinyxml/tinyxml-config.cmake
  7. 19
      3rd/tinyxml-x64/share/tinyxml/tinyxmlTargets-debug.cmake
  8. 19
      3rd/tinyxml-x64/share/tinyxml/tinyxmlTargets-release.cmake
  9. 105
      3rd/tinyxml-x64/share/tinyxml/tinyxmlTargets.cmake
  10. 221
      3rd/tinyxml-x64/share/tinyxml/vcpkg.spdx.json
  11. 19
      3rd/tinyxml-x64/share/tinyxml/vcpkg_abi_info.txt
  12. BIN
      3rd/tinyxml-x86/debug/lib/tinyxml.lib
  13. 1811
      3rd/tinyxml-x86/include/tinyxml.h
  14. 42
      3rd/tinyxml-x86/include/tinyxml_export.h
  15. BIN
      3rd/tinyxml-x86/lib/tinyxml.lib
  16. 20
      3rd/tinyxml-x86/share/tinyxml/copyright
  17. 8
      3rd/tinyxml-x86/share/tinyxml/tinyxml-config.cmake
  18. 19
      3rd/tinyxml-x86/share/tinyxml/tinyxmlTargets-debug.cmake
  19. 19
      3rd/tinyxml-x86/share/tinyxml/tinyxmlTargets-release.cmake
  20. 105
      3rd/tinyxml-x86/share/tinyxml/tinyxmlTargets.cmake
  21. 221
      3rd/tinyxml-x86/share/tinyxml/vcpkg.spdx.json
  22. 19
      3rd/tinyxml-x86/share/tinyxml/vcpkg_abi_info.txt
  23. 229
      CMakeLists.txt
  24. 80
      lib/CMakeLists.txt

BIN
3rd/tinyxml-x64/debug/lib/tinyxml.lib

Binary file not shown.

1811
3rd/tinyxml-x64/include/tinyxml.h

File diff suppressed because it is too large

42
3rd/tinyxml-x64/include/tinyxml_export.h

@ -0,0 +1,42 @@
#ifndef TINYXML_EXPORT_H
#define TINYXML_EXPORT_H
#ifdef TINYXML_STATIC_DEFINE
# define TINYXML_EXPORT
# define TINYXML_NO_EXPORT
#else
# ifndef TINYXML_EXPORT
# ifdef unofficial_tinyxml_EXPORTS
/* We are building this library */
# define TINYXML_EXPORT
# else
/* We are using this library */
# define TINYXML_EXPORT
# endif
# endif
# ifndef TINYXML_NO_EXPORT
# define TINYXML_NO_EXPORT
# endif
#endif
#ifndef TINYXML_DEPRECATED
# define TINYXML_DEPRECATED __declspec(deprecated)
#endif
#ifndef TINYXML_DEPRECATED_EXPORT
# define TINYXML_DEPRECATED_EXPORT TINYXML_EXPORT TINYXML_DEPRECATED
#endif
#ifndef TINYXML_DEPRECATED_NO_EXPORT
# define TINYXML_DEPRECATED_NO_EXPORT TINYXML_NO_EXPORT TINYXML_DEPRECATED
#endif
#if 0 /* DEFINE_NO_DEPRECATED */
# ifndef TINYXML_NO_DEPRECATED
# define TINYXML_NO_DEPRECATED
# endif
#endif
#endif /* TINYXML_EXPORT_H */

BIN
3rd/tinyxml-x64/lib/tinyxml.lib

Binary file not shown.

20
3rd/tinyxml-x64/share/tinyxml/copyright

@ -0,0 +1,20 @@
TinyXML is released under the zlib license:
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.

8
3rd/tinyxml-x64/share/tinyxml/tinyxml-config.cmake

@ -0,0 +1,8 @@
if (tinyxml_CONFIG_INCLUDED)
return()
endif()
set(tinyxml_CONFIG_INCLUDED TRUE)
include(${CMAKE_CURRENT_LIST_DIR}/tinyxmlTargets.cmake)
set(tinyxml_LIBRARIES unofficial-tinyxml::unofficial-tinyxml)
get_target_property(tinyxml_INCLUDE_DIRS unofficial-tinyxml::unofficial-tinyxml INTERFACE_INCLUDE_DIRECTORIES)

19
3rd/tinyxml-x64/share/tinyxml/tinyxmlTargets-debug.cmake

@ -0,0 +1,19 @@
#----------------------------------------------------------------
# Generated CMake target import file for configuration "Debug".
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "unofficial-tinyxml::unofficial-tinyxml" for configuration "Debug"
set_property(TARGET unofficial-tinyxml::unofficial-tinyxml APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(unofficial-tinyxml::unofficial-tinyxml PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/lib/tinyxml.lib"
)
list(APPEND _cmake_import_check_targets unofficial-tinyxml::unofficial-tinyxml )
list(APPEND _cmake_import_check_files_for_unofficial-tinyxml::unofficial-tinyxml "${_IMPORT_PREFIX}/debug/lib/tinyxml.lib" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)

19
3rd/tinyxml-x64/share/tinyxml/tinyxmlTargets-release.cmake

@ -0,0 +1,19 @@
#----------------------------------------------------------------
# Generated CMake target import file for configuration "Release".
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "unofficial-tinyxml::unofficial-tinyxml" for configuration "Release"
set_property(TARGET unofficial-tinyxml::unofficial-tinyxml APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(unofficial-tinyxml::unofficial-tinyxml PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/tinyxml.lib"
)
list(APPEND _cmake_import_check_targets unofficial-tinyxml::unofficial-tinyxml )
list(APPEND _cmake_import_check_files_for_unofficial-tinyxml::unofficial-tinyxml "${_IMPORT_PREFIX}/lib/tinyxml.lib" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)

105
3rd/tinyxml-x64/share/tinyxml/tinyxmlTargets.cmake

@ -0,0 +1,105 @@
# Generated by CMake
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
message(FATAL_ERROR "CMake >= 2.8.0 required")
endif()
if(CMAKE_VERSION VERSION_LESS "2.8.3")
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.8.3...3.27)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_cmake_targets_defined "")
set(_cmake_targets_not_defined "")
set(_cmake_expected_targets "")
foreach(_cmake_expected_target IN ITEMS unofficial-tinyxml::unofficial-tinyxml)
list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
if(TARGET "${_cmake_expected_target}")
list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
else()
list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
endif()
endforeach()
unset(_cmake_expected_target)
if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
unset(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
return()
endif()
if(NOT _cmake_targets_defined STREQUAL "")
string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
endif()
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
# Compute the installation prefix relative to this file.
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
if(_IMPORT_PREFIX STREQUAL "/")
set(_IMPORT_PREFIX "")
endif()
# Create imported target unofficial-tinyxml::unofficial-tinyxml
add_library(unofficial-tinyxml::unofficial-tinyxml STATIC IMPORTED)
set_target_properties(unofficial-tinyxml::unofficial-tinyxml PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
)
# Load information for each installed configuration.
file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/tinyxmlTargets-*.cmake")
foreach(_cmake_config_file IN LISTS _cmake_config_files)
include("${_cmake_config_file}")
endforeach()
unset(_cmake_config_file)
unset(_cmake_config_files)
# Cleanup temporary variables.
set(_IMPORT_PREFIX)
# Loop over all imported files and verify that they actually exist
foreach(_cmake_target IN LISTS _cmake_import_check_targets)
if(CMAKE_VERSION VERSION_LESS "3.28"
OR NOT DEFINED _cmake_import_check_xcframework_for_${_cmake_target}
OR NOT IS_DIRECTORY "${_cmake_import_check_xcframework_for_${_cmake_target}}")
foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
if(NOT EXISTS "${_cmake_file}")
message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
\"${_cmake_file}\"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
\"${CMAKE_CURRENT_LIST_FILE}\"
but not all the files it references.
")
endif()
endforeach()
endif()
unset(_cmake_file)
unset("_cmake_import_check_files_for_${_cmake_target}")
endforeach()
unset(_cmake_target)
unset(_cmake_import_check_targets)
# This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set.
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)

221
3rd/tinyxml-x64/share/tinyxml/vcpkg.spdx.json

@ -0,0 +1,221 @@
{
"$schema": "https://raw.githubusercontent.com/spdx/spdx-spec/v2.2.1/schemas/spdx-schema.json",
"spdxVersion": "SPDX-2.2",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"documentNamespace": "https://spdx.org/spdxdocs/tinyxml-x64-windows-2.6.2#10-6cd36ac9-9b64-42fc-89f7-203847cddfbe",
"name": "tinyxml:x64-windows@2.6.2#10 9a879bbd54972b50a639c9c47559da3b4f0832a220c090beb948a29a83720f38",
"creationInfo": {
"creators": [
"Tool: vcpkg-d6945642ee5c3076addd1a42c331bbf4cfc97457"
],
"created": "2024-05-21T05:03:48Z"
},
"relationships": [
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "GENERATES",
"relatedSpdxElement": "SPDXRef-binary"
},
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "SPDXRef-file-0"
},
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "SPDXRef-file-1"
},
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "SPDXRef-file-2"
},
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "SPDXRef-file-3"
},
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "SPDXRef-file-4"
},
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "SPDXRef-file-5"
},
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "SPDXRef-file-6"
},
{
"spdxElementId": "SPDXRef-binary",
"relationshipType": "GENERATED_FROM",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-0",
"relationshipType": "CONTAINED_BY",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-1",
"relationshipType": "CONTAINED_BY",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-2",
"relationshipType": "CONTAINED_BY",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-3",
"relationshipType": "CONTAINED_BY",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-4",
"relationshipType": "CONTAINED_BY",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-5",
"relationshipType": "CONTAINED_BY",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-6",
"relationshipType": "CONTAINED_BY",
"relatedSpdxElement": "SPDXRef-port"
}
],
"packages": [
{
"name": "tinyxml",
"SPDXID": "SPDXRef-port",
"versionInfo": "2.6.2#10",
"downloadLocation": "git+https://github.com/Microsoft/vcpkg#ports/tinyxml",
"homepage": "https://sourceforge.net/projects/tinyxml",
"licenseConcluded": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"copyrightText": "NOASSERTION",
"description": "A simple, small, minimal, C++ XML parser that can be easily integrating into other programs.",
"comment": "This is the port (recipe) consumed by vcpkg."
},
{
"name": "tinyxml:x64-windows",
"SPDXID": "SPDXRef-binary",
"versionInfo": "9a879bbd54972b50a639c9c47559da3b4f0832a220c090beb948a29a83720f38",
"downloadLocation": "NONE",
"licenseConcluded": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"copyrightText": "NOASSERTION",
"comment": "This is a binary package built by vcpkg."
},
{
"SPDXID": "SPDXRef-resource-1",
"name": "tinyxml_2_6_2.tar.gz",
"packageFileName": "tinyxml_2_6_2.tar.gz",
"downloadLocation": "https://sourceforge.net/projects/tinyxml/tinyxml/files/2.6.2/tinyxml_2_6_2.tar.gz",
"licenseConcluded": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"copyrightText": "NOASSERTION",
"checksums": [
{
"algorithm": "SHA512",
"checksumValue": "133b5db06131a90ad0c2b39b0063f1c8e65e67288a7e5d67e1f7d9ba32af10dc5dfa0462f9723985ee27debe8f09a10a25d4b5a5aaff2ede979b1cebe8e59d56"
}
]
}
],
"files": [
{
"fileName": "./D:/vcpkg/ports/tinyxml/0001_use_stl.patch",
"SPDXID": "SPDXRef-file-0",
"checksums": [
{
"algorithm": "SHA256",
"checksumValue": "39276cc7a9d8c8a6ec83377b1d88378c4d992df8c94131328d33352a4b338e17"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
},
{
"fileName": "./D:/vcpkg/ports/tinyxml/0002_export_tinyxml.patch",
"SPDXID": "SPDXRef-file-1",
"checksums": [
{
"algorithm": "SHA256",
"checksumValue": "290be2bdad03cf5cc3042d4ac0e6dc7720fd6d24fa6440143e63f9b25dc204d2"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
},
{
"fileName": "./D:/vcpkg/ports/tinyxml/CMakeLists.txt",
"SPDXID": "SPDXRef-file-2",
"checksums": [
{
"algorithm": "SHA256",
"checksumValue": "0564dd93a4e5c2d80129d59b072d44c6627f2400193e47f804b7b58f41d69bcb"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
},
{
"fileName": "./D:/vcpkg/ports/tinyxml/License.txt",
"SPDXID": "SPDXRef-file-3",
"checksums": [
{
"algorithm": "SHA256",
"checksumValue": "d8a8a392e58169ea7cd77dcb0d5618828225ff1c81575ab913de7062a38823ff"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
},
{
"fileName": "./D:/vcpkg/ports/tinyxml/portfile.cmake",
"SPDXID": "SPDXRef-file-4",
"checksums": [
{
"algorithm": "SHA256",
"checksumValue": "d947a468e0f567062564691f4c9bb3167c5d59dcded4a2c6fbcda0367a2085fb"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
},
{
"fileName": "./D:/vcpkg/ports/tinyxml/tinyxml-config.cmake",
"SPDXID": "SPDXRef-file-5",
"checksums": [
{
"algorithm": "SHA256",
"checksumValue": "cd96df237e5e3b503e07305968bff8751819cf5ce427ef2234dea9e349ec1801"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
},
{
"fileName": "./D:/vcpkg/ports/tinyxml/vcpkg.json",
"SPDXID": "SPDXRef-file-6",
"checksums": [
{
"algorithm": "SHA256",
"checksumValue": "4ad17fa24fc61d9e0bcc29521089f87c43583c57c03e4519838bc95556429a2c"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
}
]
}

19
3rd/tinyxml-x64/share/tinyxml/vcpkg_abi_info.txt

@ -0,0 +1,19 @@
0001_use_stl.patch 39276cc7a9d8c8a6ec83377b1d88378c4d992df8c94131328d33352a4b338e17
0002_export_tinyxml.patch 290be2bdad03cf5cc3042d4ac0e6dc7720fd6d24fa6440143e63f9b25dc204d2
CMakeLists.txt 0564dd93a4e5c2d80129d59b072d44c6627f2400193e47f804b7b58f41d69bcb
License.txt d8a8a392e58169ea7cd77dcb0d5618828225ff1c81575ab913de7062a38823ff
cmake 3.29.2
features core
portfile.cmake d947a468e0f567062564691f4c9bb3167c5d59dcded4a2c6fbcda0367a2085fb
ports.cmake 0500e9e2422fe0084c99bdd0c9de4c7069b76da14c8b58228a7e95ebac43058a
post_build_checks 2
powershell 7.2.16
tinyxml-config.cmake cd96df237e5e3b503e07305968bff8751819cf5ce427ef2234dea9e349ec1801
triplet x64-windows
triplet_abi 4556164a2cd3dd6f4742101eabb46def7e71b6e5856faa88e5d005aac12a803c-e36df1c7f50ab25f9c182fa927d06c19ae082e0d599f132b3f655784b49e4b33-c730471f956c36166d764ee008586dc28ccb6dab
vcpkg-cmake acc3832c07cf32c8caa4e801c2949199f34a17c6b89ee4932fcfe555995a5d6d
vcpkg-cmake-config 9535f005457d5284bf6d06f4bd1d29344a8876f9b01a0c33b3755cafd91ec5b7
vcpkg.json 4ad17fa24fc61d9e0bcc29521089f87c43583c57c03e4519838bc95556429a2c
vcpkg_check_linkage 2236edfea13af20524c17d73214e0e5111bf1c13a2fc46c7f2912a46abd0c1a8
vcpkg_copy_pdbs d57e4f196c82dc562a9968c6155073094513c31e2de475694143d3aa47954b1c
vcpkg_from_sourceforge 00cb7d5767d56fdd8a1715ebd3c159fccd44dc17653522e23d2e507bce44a4f8

BIN
3rd/tinyxml-x86/debug/lib/tinyxml.lib

Binary file not shown.

1811
3rd/tinyxml-x86/include/tinyxml.h

File diff suppressed because it is too large

42
3rd/tinyxml-x86/include/tinyxml_export.h

@ -0,0 +1,42 @@
#ifndef TINYXML_EXPORT_H
#define TINYXML_EXPORT_H
#ifdef TINYXML_STATIC_DEFINE
# define TINYXML_EXPORT
# define TINYXML_NO_EXPORT
#else
# ifndef TINYXML_EXPORT
# ifdef unofficial_tinyxml_EXPORTS
/* We are building this library */
# define TINYXML_EXPORT
# else
/* We are using this library */
# define TINYXML_EXPORT
# endif
# endif
# ifndef TINYXML_NO_EXPORT
# define TINYXML_NO_EXPORT
# endif
#endif
#ifndef TINYXML_DEPRECATED
# define TINYXML_DEPRECATED __declspec(deprecated)
#endif
#ifndef TINYXML_DEPRECATED_EXPORT
# define TINYXML_DEPRECATED_EXPORT TINYXML_EXPORT TINYXML_DEPRECATED
#endif
#ifndef TINYXML_DEPRECATED_NO_EXPORT
# define TINYXML_DEPRECATED_NO_EXPORT TINYXML_NO_EXPORT TINYXML_DEPRECATED
#endif
#if 0 /* DEFINE_NO_DEPRECATED */
# ifndef TINYXML_NO_DEPRECATED
# define TINYXML_NO_DEPRECATED
# endif
#endif
#endif /* TINYXML_EXPORT_H */

BIN
3rd/tinyxml-x86/lib/tinyxml.lib

Binary file not shown.

20
3rd/tinyxml-x86/share/tinyxml/copyright

@ -0,0 +1,20 @@
TinyXML is released under the zlib license:
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.

8
3rd/tinyxml-x86/share/tinyxml/tinyxml-config.cmake

@ -0,0 +1,8 @@
if (tinyxml_CONFIG_INCLUDED)
return()
endif()
set(tinyxml_CONFIG_INCLUDED TRUE)
include(${CMAKE_CURRENT_LIST_DIR}/tinyxmlTargets.cmake)
set(tinyxml_LIBRARIES unofficial-tinyxml::unofficial-tinyxml)
get_target_property(tinyxml_INCLUDE_DIRS unofficial-tinyxml::unofficial-tinyxml INTERFACE_INCLUDE_DIRECTORIES)

19
3rd/tinyxml-x86/share/tinyxml/tinyxmlTargets-debug.cmake

@ -0,0 +1,19 @@
#----------------------------------------------------------------
# Generated CMake target import file for configuration "Debug".
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "unofficial-tinyxml::unofficial-tinyxml" for configuration "Debug"
set_property(TARGET unofficial-tinyxml::unofficial-tinyxml APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(unofficial-tinyxml::unofficial-tinyxml PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/lib/tinyxml.lib"
)
list(APPEND _cmake_import_check_targets unofficial-tinyxml::unofficial-tinyxml )
list(APPEND _cmake_import_check_files_for_unofficial-tinyxml::unofficial-tinyxml "${_IMPORT_PREFIX}/debug/lib/tinyxml.lib" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)

19
3rd/tinyxml-x86/share/tinyxml/tinyxmlTargets-release.cmake

@ -0,0 +1,19 @@
#----------------------------------------------------------------
# Generated CMake target import file for configuration "Release".
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "unofficial-tinyxml::unofficial-tinyxml" for configuration "Release"
set_property(TARGET unofficial-tinyxml::unofficial-tinyxml APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(unofficial-tinyxml::unofficial-tinyxml PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/tinyxml.lib"
)
list(APPEND _cmake_import_check_targets unofficial-tinyxml::unofficial-tinyxml )
list(APPEND _cmake_import_check_files_for_unofficial-tinyxml::unofficial-tinyxml "${_IMPORT_PREFIX}/lib/tinyxml.lib" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)

105
3rd/tinyxml-x86/share/tinyxml/tinyxmlTargets.cmake

@ -0,0 +1,105 @@
# Generated by CMake
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
message(FATAL_ERROR "CMake >= 2.8.0 required")
endif()
if(CMAKE_VERSION VERSION_LESS "2.8.3")
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.8.3...3.27)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_cmake_targets_defined "")
set(_cmake_targets_not_defined "")
set(_cmake_expected_targets "")
foreach(_cmake_expected_target IN ITEMS unofficial-tinyxml::unofficial-tinyxml)
list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
if(TARGET "${_cmake_expected_target}")
list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
else()
list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
endif()
endforeach()
unset(_cmake_expected_target)
if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
unset(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
return()
endif()
if(NOT _cmake_targets_defined STREQUAL "")
string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
endif()
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
# Compute the installation prefix relative to this file.
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
if(_IMPORT_PREFIX STREQUAL "/")
set(_IMPORT_PREFIX "")
endif()
# Create imported target unofficial-tinyxml::unofficial-tinyxml
add_library(unofficial-tinyxml::unofficial-tinyxml STATIC IMPORTED)
set_target_properties(unofficial-tinyxml::unofficial-tinyxml PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
)
# Load information for each installed configuration.
file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/tinyxmlTargets-*.cmake")
foreach(_cmake_config_file IN LISTS _cmake_config_files)
include("${_cmake_config_file}")
endforeach()
unset(_cmake_config_file)
unset(_cmake_config_files)
# Cleanup temporary variables.
set(_IMPORT_PREFIX)
# Loop over all imported files and verify that they actually exist
foreach(_cmake_target IN LISTS _cmake_import_check_targets)
if(CMAKE_VERSION VERSION_LESS "3.28"
OR NOT DEFINED _cmake_import_check_xcframework_for_${_cmake_target}
OR NOT IS_DIRECTORY "${_cmake_import_check_xcframework_for_${_cmake_target}}")
foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
if(NOT EXISTS "${_cmake_file}")
message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
\"${_cmake_file}\"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
\"${CMAKE_CURRENT_LIST_FILE}\"
but not all the files it references.
")
endif()
endforeach()
endif()
unset(_cmake_file)
unset("_cmake_import_check_files_for_${_cmake_target}")
endforeach()
unset(_cmake_target)
unset(_cmake_import_check_targets)
# This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set.
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)

221
3rd/tinyxml-x86/share/tinyxml/vcpkg.spdx.json

@ -0,0 +1,221 @@
{
"$schema": "https://raw.githubusercontent.com/spdx/spdx-spec/v2.2.1/schemas/spdx-schema.json",
"spdxVersion": "SPDX-2.2",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"documentNamespace": "https://spdx.org/spdxdocs/tinyxml-x86-windows-2.6.2#10-74e60436-f1c4-497b-8c6b-fd5b47ad367d",
"name": "tinyxml:x86-windows@2.6.2#10 238927203bcb5e0bba5e68d4c2f48581bd2a9b982c3eecca4e62802c241162b2",
"creationInfo": {
"creators": [
"Tool: vcpkg-d6945642ee5c3076addd1a42c331bbf4cfc97457"
],
"created": "2024-05-30T11:30:35Z"
},
"relationships": [
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "GENERATES",
"relatedSpdxElement": "SPDXRef-binary"
},
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "SPDXRef-file-0"
},
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "SPDXRef-file-1"
},
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "SPDXRef-file-2"
},
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "SPDXRef-file-3"
},
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "SPDXRef-file-4"
},
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "SPDXRef-file-5"
},
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "SPDXRef-file-6"
},
{
"spdxElementId": "SPDXRef-binary",
"relationshipType": "GENERATED_FROM",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-0",
"relationshipType": "CONTAINED_BY",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-1",
"relationshipType": "CONTAINED_BY",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-2",
"relationshipType": "CONTAINED_BY",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-3",
"relationshipType": "CONTAINED_BY",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-4",
"relationshipType": "CONTAINED_BY",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-5",
"relationshipType": "CONTAINED_BY",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-6",
"relationshipType": "CONTAINED_BY",
"relatedSpdxElement": "SPDXRef-port"
}
],
"packages": [
{
"name": "tinyxml",
"SPDXID": "SPDXRef-port",
"versionInfo": "2.6.2#10",
"downloadLocation": "git+https://github.com/Microsoft/vcpkg#ports/tinyxml",
"homepage": "https://sourceforge.net/projects/tinyxml",
"licenseConcluded": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"copyrightText": "NOASSERTION",
"description": "A simple, small, minimal, C++ XML parser that can be easily integrating into other programs.",
"comment": "This is the port (recipe) consumed by vcpkg."
},
{
"name": "tinyxml:x86-windows",
"SPDXID": "SPDXRef-binary",
"versionInfo": "238927203bcb5e0bba5e68d4c2f48581bd2a9b982c3eecca4e62802c241162b2",
"downloadLocation": "NONE",
"licenseConcluded": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"copyrightText": "NOASSERTION",
"comment": "This is a binary package built by vcpkg."
},
{
"SPDXID": "SPDXRef-resource-1",
"name": "tinyxml_2_6_2.tar.gz",
"packageFileName": "tinyxml_2_6_2.tar.gz",
"downloadLocation": "https://sourceforge.net/projects/tinyxml/tinyxml/files/2.6.2/tinyxml_2_6_2.tar.gz",
"licenseConcluded": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"copyrightText": "NOASSERTION",
"checksums": [
{
"algorithm": "SHA512",
"checksumValue": "133b5db06131a90ad0c2b39b0063f1c8e65e67288a7e5d67e1f7d9ba32af10dc5dfa0462f9723985ee27debe8f09a10a25d4b5a5aaff2ede979b1cebe8e59d56"
}
]
}
],
"files": [
{
"fileName": "./D:/vcpkg/ports/tinyxml/0001_use_stl.patch",
"SPDXID": "SPDXRef-file-0",
"checksums": [
{
"algorithm": "SHA256",
"checksumValue": "39276cc7a9d8c8a6ec83377b1d88378c4d992df8c94131328d33352a4b338e17"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
},
{
"fileName": "./D:/vcpkg/ports/tinyxml/0002_export_tinyxml.patch",
"SPDXID": "SPDXRef-file-1",
"checksums": [
{
"algorithm": "SHA256",
"checksumValue": "290be2bdad03cf5cc3042d4ac0e6dc7720fd6d24fa6440143e63f9b25dc204d2"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
},
{
"fileName": "./D:/vcpkg/ports/tinyxml/CMakeLists.txt",
"SPDXID": "SPDXRef-file-2",
"checksums": [
{
"algorithm": "SHA256",
"checksumValue": "0564dd93a4e5c2d80129d59b072d44c6627f2400193e47f804b7b58f41d69bcb"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
},
{
"fileName": "./D:/vcpkg/ports/tinyxml/License.txt",
"SPDXID": "SPDXRef-file-3",
"checksums": [
{
"algorithm": "SHA256",
"checksumValue": "d8a8a392e58169ea7cd77dcb0d5618828225ff1c81575ab913de7062a38823ff"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
},
{
"fileName": "./D:/vcpkg/ports/tinyxml/portfile.cmake",
"SPDXID": "SPDXRef-file-4",
"checksums": [
{
"algorithm": "SHA256",
"checksumValue": "d947a468e0f567062564691f4c9bb3167c5d59dcded4a2c6fbcda0367a2085fb"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
},
{
"fileName": "./D:/vcpkg/ports/tinyxml/tinyxml-config.cmake",
"SPDXID": "SPDXRef-file-5",
"checksums": [
{
"algorithm": "SHA256",
"checksumValue": "cd96df237e5e3b503e07305968bff8751819cf5ce427ef2234dea9e349ec1801"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
},
{
"fileName": "./D:/vcpkg/ports/tinyxml/vcpkg.json",
"SPDXID": "SPDXRef-file-6",
"checksums": [
{
"algorithm": "SHA256",
"checksumValue": "4ad17fa24fc61d9e0bcc29521089f87c43583c57c03e4519838bc95556429a2c"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
}
]
}

19
3rd/tinyxml-x86/share/tinyxml/vcpkg_abi_info.txt

@ -0,0 +1,19 @@
0001_use_stl.patch 39276cc7a9d8c8a6ec83377b1d88378c4d992df8c94131328d33352a4b338e17
0002_export_tinyxml.patch 290be2bdad03cf5cc3042d4ac0e6dc7720fd6d24fa6440143e63f9b25dc204d2
CMakeLists.txt 0564dd93a4e5c2d80129d59b072d44c6627f2400193e47f804b7b58f41d69bcb
License.txt d8a8a392e58169ea7cd77dcb0d5618828225ff1c81575ab913de7062a38823ff
cmake 3.29.2
features core
portfile.cmake d947a468e0f567062564691f4c9bb3167c5d59dcded4a2c6fbcda0367a2085fb
ports.cmake 0500e9e2422fe0084c99bdd0c9de4c7069b76da14c8b58228a7e95ebac43058a
post_build_checks 2
powershell 7.2.16
tinyxml-config.cmake cd96df237e5e3b503e07305968bff8751819cf5ce427ef2234dea9e349ec1801
triplet x86-windows
triplet_abi 3e71dd1d4afa622894ae367adbbb1ecbd42c57c51428a86b675fa1c8cad3a581-e36df1c7f50ab25f9c182fa927d06c19ae082e0d599f132b3f655784b49e4b33-95b99c3ce63053f0a58c631ce93c725740a2d289
vcpkg-cmake acc3832c07cf32c8caa4e801c2949199f34a17c6b89ee4932fcfe555995a5d6d
vcpkg-cmake-config 9535f005457d5284bf6d06f4bd1d29344a8876f9b01a0c33b3755cafd91ec5b7
vcpkg.json 4ad17fa24fc61d9e0bcc29521089f87c43583c57c03e4519838bc95556429a2c
vcpkg_check_linkage 2236edfea13af20524c17d73214e0e5111bf1c13a2fc46c7f2912a46abd0c1a8
vcpkg_copy_pdbs d57e4f196c82dc562a9968c6155073094513c31e2de475694143d3aa47954b1c
vcpkg_from_sourceforge 00cb7d5767d56fdd8a1715ebd3c159fccd44dc17653522e23d2e507bce44a4f8

229
CMakeLists.txt

@ -1,111 +1,118 @@
#------------REQUIRED_1 CMake------------#
# CMakepolicies
# CMake
# CMake
cmake_minimum_required(VERSION 3.16)
#------------REQUIRED_2 ------------#
project(
WireRoutingProject # 这里没有添加任何的目标(target)
VERSION 1.0
DESCRIPTION "A project for wire routing" # CMake 3.9+
# C,CXX,Fortran,ASM,CUDA(CMake 3.8+),CSharp(3.8+),SWIFT(CMake 3.15+ experimental)
LANGUAGES CXX # C CXX
)
#------------REQUIRED_4 C++------------#
# !!!使!!!使set_target_properties/set_property
# C++ 17(STRING) CMakeCache.txt
set(CMAKE_CXX_STANDARD 17 CACHE STRING "The C++ standard to use")
# CMake 使
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# 使 -std=c++11 -std=g++11
set(CMAKE_CXX_EXTENSIONS OFF)
#------------OPTIONAL_1.1 .h.in .h------------#
# configure_file(CMAKE_CURRENT_SOURCE_DIR/{input_file} CMAKE_CURRENT_BINARY_DIR/{output_file})
configure_file(config.h.in config.h)
#------------REQUIRED_5.1.1 find_package ------------#
# CMAKE_PREFIX_PATH find_package config
if (APPLE)
list(PREPEND CMAKE_PREFIX_PATH /Users/yony/CODE/Dependencies) # MacOS
# Settign pkg-config for tinyxml usage
set(ENV{PKG_CONFIG_PATH} /opt/homebrew/lib/pkgconfig/)
find_package(PkgConfig)
pkg_search_module(TINYXML REQUIRED tinyxml)
message(STATUS "=== TINYXML_LIBRARIES: ${TINYXML_LIBRARIES}")
message(STATUS "=== TINYXML_INCLUDE_DIRS: ${TINYXML_INCLUDE_DIRS}")
elseif (WIN32)
list(PREPEND CMAKE_PREFIX_PATH D:/SOURCE/Dependencies) # Windows
set(CMAKE_TOOLCHAIN_FILE "D:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake") # vcpkg
include(${CMAKE_TOOLCHAIN_FILE})
# CONFIG <deps_dir>/share/<lib_name>/cmake/xxxConfig.cmake
find_package(tinyxml CONFIG REQUIRED)
elseif (UNIX)
list(PREPEND CMAKE_PREFIX_PATH /home/yony/PROJECTS/Dependencies) # Linux
find_package(tinyxml CONFIG REQUIRED)
endif()
# find_package
message(STATUS "CMAKE_SYSTEM_PREFIX_PATH: ${CMAKE_SYSTEM_PREFIX_PATH}")
message(STATUS "Self added CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")
#------------REQUIRED_5.1.2 include .cmakeContentFetch------------#
# cmakeCMAKE_MODULE_PATH include 使
list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
message(STATUS "Self added CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}")
# CMakeLists.txt
add_subdirectory(lib)
#------------REQUIRED_3 ------------#
# 使fileGLOB CMakeMake
# 使aux_source_directory
aux_source_directory(src SRC_DIR)
add_executable(
${PROJECT_NAME} # CMake 目标(target)
${SRC_DIR}
)
#------------REQUIRED_5.2 CMake ------------#
# target_link_libraries(${PROJECT_NAME} PUBLIC {lib_name1} {lib_name1} ...)
# CMakeLists.txt
# target_include_directories <lib_name>/include <LIB_NAME>_INCLUDE_DIRS
if (WIN32)
target_link_libraries(
${PROJECT_NAME} PUBLIC
unofficial-tinyxml::unofficial-tinyxml
${CMAKE_SOURCE_DIR}/build/lib/Debug/WireRoutingLib.lib
)
elseif (APPLE)
target_link_libraries(
${PROJECT_NAME} PUBLIC
${pkgcfg_lib_TINYXML_tinyxml}
${CMAKE_SOURCE_DIR}/build/lib/WireRoutingLib.dylib
)
endif()
#------------OPTIONAL_1.2 config.h------------#
# #include "config.h" ${PROJECT_BINARY_DIR}/config.h
target_include_directories(
# PUBLIC
# PRIVATE
# INTERFACE
${PROJECT_NAME} PUBLIC
${PROJECT_BINARY_DIR} # config.h.in build
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/lib/include
${TINYXML_INCLUDE_DIR} # tinyxml
${TINYXML_INCLUDE_DIRS} # pkg-config tinyxml dir
)
# make install
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/publish" CACHE PATH "Install path prefix" FORCE)
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/data/ DESTINATION data)
install(FILES readme.md parameters.txt DESTINATION ./)
#------------REQUIRED_1 CMake------------#
# CMakepolicies
# CMake
# CMake
cmake_minimum_required(VERSION 3.16)
#------------REQUIRED_2 ------------#
project(
WireRoutingProject # 这里没有添加任何的目标(target)
VERSION 1.0
DESCRIPTION "A project for wire routing" # CMake 3.9+
# C,CXX,Fortran,ASM,CUDA(CMake 3.8+),CSharp(3.8+),SWIFT(CMake 3.15+ experimental)
LANGUAGES CXX # C CXX
)
#------------REQUIRED_4 C++------------#
# !!!使!!!使set_target_properties/set_property
# C++ 17(STRING) CMakeCache.txt
set(CMAKE_CXX_STANDARD 17 CACHE STRING "The C++ standard to use")
# CMake 使
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# 使 -std=c++11 -std=g++11
set(CMAKE_CXX_EXTENSIONS OFF)
#------------OPTIONAL_1.1 .h.in .h------------#
# configure_file(CMAKE_CURRENT_SOURCE_DIR/{input_file} CMAKE_CURRENT_BINARY_DIR/{output_file})
configure_file(config.h.in config.h)
#------------REQUIRED_5.1.1 find_package ------------#
# CMAKE_PREFIX_PATH find_package config
if (WIN32)
# Windows
# list(PREPEND CMAKE_PREFIX_PATH ${CMAKE_SOURCE_DIR}/3rd/tinyxml-x86)
list(PREPEND CMAKE_PREFIX_PATH ${CMAKE_SOURCE_DIR}/3rd/tinyxml-x64)
# vcpkg
set(CMAKE_TOOLCHAIN_FILE "D:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake")
include(${CMAKE_TOOLCHAIN_FILE})
# CONFIG <deps_dir>/share/<lib_name>/cmake/xxxConfig.cmake
find_package(tinyxml CONFIG REQUIRED)
# MSVC C4819 warning
add_compile_options(/wd4819)
elseif (APPLE)
# MacOS
list(PREPEND CMAKE_PREFIX_PATH /Users/yony/CODE/Dependencies)
# Setting pkg-config for tinyxml usage
set(ENV{PKG_CONFIG_PATH} /opt/homebrew/lib/pkgconfig/)
find_package(PkgConfig)
pkg_search_module(TINYXML REQUIRED tinyxml)
message(STATUS "=== TINYXML_LIBRARIES: ${TINYXML_LIBRARIES}")
message(STATUS "=== TINYXML_INCLUDE_DIRS: ${TINYXML_INCLUDE_DIRS}")
elseif (UNIX)
# Linux
list(PREPEND CMAKE_PREFIX_PATH /home/yony/PROJECTS/Dependencies)
find_package(tinyxml CONFIG REQUIRED)
endif()
# find_package
message(STATUS "CMAKE_SYSTEM_PREFIX_PATH: ${CMAKE_SYSTEM_PREFIX_PATH}")
message(STATUS "Self added CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")
#------------REQUIRED_5.1.2 include .cmakeContentFetch------------#
# cmakeCMAKE_MODULE_PATH include 使
list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
message(STATUS "Self added CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}")
# CMakeLists.txt
add_subdirectory(lib)
#------------REQUIRED_3 ------------#
# 使fileGLOB CMakeMake
# 使aux_source_directory
aux_source_directory(src SRC_DIR)
add_executable(
${PROJECT_NAME} # CMake 目标(target)
${SRC_DIR}
)
#------------REQUIRED_5.2 CMake ------------#
# target_link_libraries(${PROJECT_NAME} PUBLIC {lib_name1} {lib_name1} ...)
# CMakeLists.txt
# target_include_directories <lib_name>/include <LIB_NAME>_INCLUDE_DIRS
if (WIN32)
target_link_libraries(
${PROJECT_NAME} PUBLIC
unofficial-tinyxml::unofficial-tinyxml
${CMAKE_SOURCE_DIR}/build/lib/Debug/WireRoutingLib.lib
)
elseif (APPLE)
target_link_libraries(
${PROJECT_NAME} PUBLIC
${pkgcfg_lib_TINYXML_tinyxml}
${CMAKE_SOURCE_DIR}/build/lib/WireRoutingLib.dylib
)
endif()
#------------OPTIONAL_1.2 config.h------------#
# #include "config.h" ${PROJECT_BINARY_DIR}/config.h
target_include_directories(
# PUBLIC
# PRIVATE
# INTERFACE
${PROJECT_NAME} PUBLIC
${PROJECT_BINARY_DIR} # config.h.in build
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/lib/include
${TINYXML_INCLUDE_DIR} # Windows: tinyxml header dir
${TINYXML_INCLUDE_DIRS} # MacOS: pkg-config tinyxml dir
)
# make install
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/publish" CACHE PATH "Install path prefix" FORCE)
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) # .exe .dll
install(DIRECTORY ${CMAKE_SOURCE_DIR}/data/ DESTINATION data)
install(FILES readme.md parameters.txt DESTINATION ./)

80
lib/CMakeLists.txt

@ -1,39 +1,41 @@
# MSVC C4819 warning
if (WIN32)
add_compile_options(/wd4819)
endif()
aux_source_directory(${CMAKE_SOURCE_DIR}/lib/src SRC_FILES_IN_LIB)
message(STATUS "SRC_FILES_IN_LIB: ${SRC_FILES_IN_LIB}")
# WireRoutingLib
add_library(WireRoutingLib SHARED ${SRC_FILES_IN_LIB})
# WIREROUTINGDLL_EXPORTSWireRoutingLibexport
target_compile_definitions(WireRoutingLib PRIVATE WIREROUTINGDLL_EXPORTS)
# C++
set_target_properties(
WireRoutingLib PROPERTIES
OUTPUT_NAME "WireRoutingLib"
PREFIX ""
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
)
get_target_property(CXX_STD_VER WireRoutingLib CXX_STANDARD)
message(STATUS "C++ version using: " ${CXX_STD_VER})
#
target_include_directories(
WireRoutingLib PUBLIC
${CMAKE_SOURCE_DIR}/lib/include
)
file(GLOB INCLUDE_FILES_IN_LIB "${CMAKE_SOURCE_DIR}/lib/include/*.h")
message(STATUS "INCLUDE_FILES_IN_LIB: ${INCLUDE_FILES_IN_LIB}")
# make install
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/publish" CACHE PATH "Install path prefix" FORCE)
install(TARGETS WireRoutingLib ARCHIVE DESTINATION lib)
install(TARGETS WireRoutingLib LIBRARY DESTINATION lib)
install(TARGETS WireRoutingLib LIBRARY DESTINATION bin)
install(FILES ${INCLUDE_FILES_IN_LIB} DESTINATION include)
# MSVC C4819 warning
if (WIN32)
add_compile_options(/wd4819)
endif()
aux_source_directory(${CMAKE_SOURCE_DIR}/lib/src SRC_FILES_IN_LIB)
message(STATUS "SRC_FILES_IN_LIB: ${SRC_FILES_IN_LIB}")
# WireRoutingLib
add_library(WireRoutingLib SHARED ${SRC_FILES_IN_LIB})
# WIREROUTINGDLL_EXPORTSWireRoutingLibexport
target_compile_definitions(WireRoutingLib PRIVATE WIREROUTINGDLL_EXPORTS)
# C++
set_target_properties(
WireRoutingLib PROPERTIES
OUTPUT_NAME "WireRoutingLib"
PREFIX ""
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/build # DLLbuild
)
get_target_property(CXX_STD_VER WireRoutingLib CXX_STANDARD)
message(STATUS "C++ version using: " ${CXX_STD_VER})
#
target_include_directories(
WireRoutingLib PUBLIC
${CMAKE_SOURCE_DIR}/lib/include
)
file(GLOB INCLUDE_FILES_IN_LIB "${CMAKE_SOURCE_DIR}/lib/include/*.h")
message(STATUS "INCLUDE_FILES_IN_LIB: ${INCLUDE_FILES_IN_LIB}")
# make install
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/publish" CACHE PATH "Install path prefix" FORCE)
install(TARGETS WireRoutingLib ARCHIVE DESTINATION lib)
install(TARGETS WireRoutingLib LIBRARY DESTINATION lib)
install(TARGETS WireRoutingLib RUNTIME DESTINATION lib)
install(TARGETS WireRoutingLib RUNTIME DESTINATION bin) # .dll
install(FILES ${INCLUDE_FILES_IN_LIB} DESTINATION include)

Loading…
Cancel
Save