Skip to content

Commit

Permalink
Merge pull request #110 from aminya/export-destination [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya authored Mar 31, 2022
2 parents 4e2b395 + 5973d96 commit a88579d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ Other arguments that are automatically found and manually specifying them is not

- `COMPATIBILITY`: the compatibility version of the package. Defaults to `SameMajorVersion`.

- `CONFIG_EXPORT_DESTINATION`: the destination for exporting the configuration files. Defaults to `${CMAKE_BINARY_DIR}`
- `CONFIG_EXPORT_DESTINATION`: the destination for exporting the configuration files. Defaults to `${CMAKE_BINARY_DIR}/${NAME}`

- `CONFIG_INSTALL_DESTINATION`: the destination for installation of the configuration files. Defaults to `${CMAKE_INSTALL_DATADIR}/${NAME}`

Expand Down
6 changes: 3 additions & 3 deletions src/PackageProject.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function(package_project)
VERSION
# default to semver
COMPATIBILITY
# default to ${CMAKE_BINARY_DIR}
# default to ${CMAKE_BINARY_DIR}/${NAME}
CONFIG_EXPORT_DESTINATION
# default to ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${NAME} suitable for vcpkg, etc.
CONFIG_INSTALL_DESTINATION)
Expand Down Expand Up @@ -82,9 +82,9 @@ function(package_project)
set(_PackageProject_COMPATIBILITY "SameMajorVersion")
endif()

# default to the build directory
# default to the build_directory/project_name
if("${_PackageProject_CONFIG_EXPORT_DESTINATION}" STREQUAL "")
set(_PackageProject_CONFIG_EXPORT_DESTINATION "${CMAKE_BINARY_DIR}")
set(_PackageProject_CONFIG_EXPORT_DESTINATION "${CMAKE_BINARY_DIR}/${_PackageProject_NAME}")
endif()
set(_PackageProject_EXPORT_DESTINATION "${_PackageProject_CONFIG_EXPORT_DESTINATION}")

Expand Down

0 comments on commit a88579d

Please sign in to comment.