mirror of
https://github.com/vimpunk/mio.git
synced 2025-12-06 08:46:51 +08:00
Fixed CMake prefix generator bug
This commit is contained in:
parent
2bde42c3f2
commit
61567f4c57
@ -10,7 +10,9 @@ cmake_minimum_required(VERSION 3.8)
|
||||
#
|
||||
if(DEFINED PROJECT_NAME)
|
||||
set(subproject ON)
|
||||
if(NOT DEFINED INSTALL_SUBPROJECTS)
|
||||
set(INSTALL_SUBPROJECTS ON CACHE BOOL "Install subproject dependencies")
|
||||
endif()
|
||||
else()
|
||||
set(subproject OFF)
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
@ -51,7 +53,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
#
|
||||
CMAKE_DEPENDENT_OPTION(mio.tests
|
||||
"Build the mio tests and integrate with ctest"
|
||||
${BUILD_TESTING} "NOT subproject" OFF)
|
||||
ON "BUILD_TESTING; NOT subproject" OFF)
|
||||
|
||||
#
|
||||
# On Windows, so as to be a "good citizen", mio offers two mechanisms to control
|
||||
@ -104,7 +106,7 @@ add_library(mio::mio ALIAS mio)
|
||||
#
|
||||
string(CONCAT prefix
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>"
|
||||
"$<INSTALL_INTERFACE:include>")
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
|
||||
|
||||
target_include_directories(mio INTERFACE ${prefix})
|
||||
|
||||
@ -199,15 +201,6 @@ if(mio.installation)
|
||||
# RPM Package Manager files, Windows NSIS installation wizards,
|
||||
# Apple Disk Images (.dmg), etc.
|
||||
#
|
||||
# Any system libraries required (runtimes, threading, etc) should be bundled
|
||||
# with the project for this type of installation. The
|
||||
# `InstallRequiredSystemLibraries` CMake module attempts to provide this
|
||||
# functionality in an automated way. Additional libraries may be specified as
|
||||
#
|
||||
# ```cmake
|
||||
# list(APPEND CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS <library>)
|
||||
# ```
|
||||
#
|
||||
# A packaged installation can be generated by calling
|
||||
#
|
||||
# ```sh
|
||||
@ -221,7 +214,7 @@ if(mio.installation)
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
|
||||
"Cross-platform C++11 header-only library for memory mapped file IO")
|
||||
set(CMAKE_PROJECT_HOMEPAGE_URL "https://github.com/mandreyel/mio")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user