mirror of
https://github.com/mpusz/mp-units.git
synced 2026-05-05 12:24:15 +02:00
refactor: MP_UNITS_INSTALL renamed to MP_UNITS_BUILD_INSTALL
This commit is contained in:
@@ -160,6 +160,14 @@ If you obtain them differently you may need to adjust some CMake files.
|
||||
|
||||
Adds C++ modules to the list of default targets.
|
||||
|
||||
[`MP_UNITS_BUILD_INSTALL`](#MP_UNITS_BUILD_INSTALL){ #MP_UNITS_BUILD_INSTALL }
|
||||
|
||||
: [:octicons-tag-24: 2.5.0][release-2-5-0] · :octicons-milestone-24:
|
||||
`ON`/`OFF` (Default: `ON`)
|
||||
|
||||
Creates an installable target. Users may want to turn this off for example when
|
||||
consuming the library via CMake's `add_subdirectory` or similar mechanisms.
|
||||
|
||||
[`MP_UNITS_API_STD_FORMAT`](#MP_UNITS_API_STD_FORMAT){ #MP_UNITS_API_STD_FORMAT }
|
||||
|
||||
: [:octicons-tag-24: 2.2.0][release-2-2-0] · :octicons-milestone-24:
|
||||
@@ -201,14 +209,6 @@ If you obtain them differently you may need to adjust some CMake files.
|
||||
|
||||
Enables experimental natural units systems support.
|
||||
|
||||
[`MP_UNITS_INSTALL`](#MP_UNITS_INSTALL){ #MP_UNITS_INSTALL }
|
||||
|
||||
: [:octicons-tag-24: 2.5.0][release-2-5-0] · :octicons-milestone-24:
|
||||
`ON`/`OFF` (Default: `ON`)
|
||||
|
||||
Creates an installable target. Users may want to turn this off for example when
|
||||
consuming the library via CMake's `add_subdirectory` or similar mechanisms.
|
||||
|
||||
[release-2-2-0]: https://github.com/mpusz/mp-units/releases/tag/v2.2.0
|
||||
[release-2-3-0]: https://github.com/mpusz/mp-units/releases/tag/v2.3.0
|
||||
[release-2-5-0]: https://github.com/mpusz/mp-units/releases/tag/v2.5.0
|
||||
@@ -491,7 +491,7 @@ with the following differences:
|
||||
EXCLUDE_FROM_ALL YES
|
||||
OPTIONS
|
||||
"MP_UNITS_BUILD_AS_SYSTEM_HEADERS ON"
|
||||
"MP_UNITS_INSTALL OFF"
|
||||
"MP_UNITS_BUILD_INSTALL OFF"
|
||||
)
|
||||
# ...
|
||||
target_link_libraries(<your_target> <PUBLIC|PRIVATE|INTERFACE> mp-units::mp-units)
|
||||
|
||||
+3
-3
@@ -39,11 +39,11 @@ check_libcxx_in_use(${projectPrefix}LIBCXX)
|
||||
# project build options
|
||||
option(${projectPrefix}BUILD_AS_SYSTEM_HEADERS "Export library as system headers" OFF)
|
||||
option(${projectPrefix}BUILD_CXX_MODULES "Add C++ modules to the list of default targets" OFF)
|
||||
option(${projectPrefix}INSTALL "Install the library" ON)
|
||||
option(${projectPrefix}BUILD_INSTALL "Install the library" ON)
|
||||
|
||||
message(STATUS "${projectPrefix}BUILD_AS_SYSTEM_HEADERS: ${${projectPrefix}BUILD_AS_SYSTEM_HEADERS}")
|
||||
message(STATUS "${projectPrefix}BUILD_CXX_MODULES: ${${projectPrefix}BUILD_CXX_MODULES}")
|
||||
message(STATUS "${projectPrefix}INSTALL: ${${projectPrefix}INSTALL}")
|
||||
message(STATUS "${projectPrefix}BUILD_INSTALL: ${${projectPrefix}BUILD_INSTALL}")
|
||||
|
||||
if(${projectPrefix}BUILD_AS_SYSTEM_HEADERS)
|
||||
set(${projectPrefix}_AS_SYSTEM SYSTEM)
|
||||
@@ -137,7 +137,7 @@ add_subdirectory(systems)
|
||||
# project-wide wrapper
|
||||
add_mp_units_module(mp-units mp-units DEPENDENCIES mp-units::core mp-units::systems MODULE_INTERFACE_UNIT mp-units.cpp)
|
||||
|
||||
if(${projectPrefix}INSTALL)
|
||||
if(${projectPrefix}BUILD_INSTALL)
|
||||
# local build
|
||||
export(EXPORT mp-unitsTargets NAMESPACE mp-units::)
|
||||
configure_file("mp-unitsConfig.cmake" "." COPYONLY)
|
||||
|
||||
Reference in New Issue
Block a user