Skip to content

Commit e885cd1

Browse files
committed
fix: the project is PackageProject.cmake not PackageProject
1 parent cc19c63 commit e885cd1

File tree

10 files changed

+18
-16
lines changed

10 files changed

+18
-16
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
/.cache
55
/compile_commands.json
66
/install_dir
7-
/cmake/PackageProject/PackageProjectConfig.cmake
7+
/cmake/PackageProject.cmake/PackageProject.cmakeConfig.cmake

CMakeLists.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,36 @@ set(PACKAGE_PROJECT_ROOT_PATH
1414
)
1515

1616
configure_file(
17-
${CMAKE_CURRENT_LIST_DIR}/cmake/PackageProject/PackageProjectConfig.cmake.in
18-
${CMAKE_CURRENT_LIST_DIR}/cmake/PackageProject/PackageProjectConfig.cmake @ONLY
17+
${CMAKE_CURRENT_LIST_DIR}/cmake/PackageProject.cmake/PackageProject.cmakeConfig.cmake.in
18+
${CMAKE_CURRENT_LIST_DIR}/cmake/PackageProject.cmake/PackageProject.cmakeConfig.cmake @ONLY
1919
)
2020

2121
if(${PackageProject.cmake_INSTALL})
2222
include(GNUInstallDirs)
2323

2424
set(CMAKEDIR
25-
${CMAKE_INSTALL_DATADIR}/cmake/PackageProject
25+
${CMAKE_INSTALL_DATADIR}/cmake/PackageProject.cmake/
2626
CACHE
2727
PATH
28-
"Path to a folder to which install the script PackageProjectConfig.cmake . By default: ${CMAKE_INSTALL_DATADIR}/cmake/PackageProject"
28+
"Path to a folder to which install the script PackageProjectConfig.cmake . By default: ${CMAKE_INSTALL_DATADIR}/cmake/PackageProject.cmake/"
2929
)
3030

31-
install(FILES "${CMAKE_CURRENT_LIST_DIR}/cmake/PackageProject/PackageProjectConfig.cmake"
32-
DESTINATION "${CMAKEDIR}"
31+
install(
32+
FILES
33+
"${CMAKE_CURRENT_LIST_DIR}/cmake/PackageProject.cmake/PackageProject.cmakeConfig.cmake"
34+
DESTINATION "${CMAKEDIR}"
3335
)
3436
if("${PACKAGE_PROJECT_ROOT_PATH_DEFAULT_VALUE}" STREQUAL "${PACKAGE_PROJECT_ROOT_PATH}")
35-
install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/cmake/PackageProject/PackageProjectFiles"
37+
install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/cmake/PackageProject.cmake/PackageProjectFiles"
3638
DESTINATION "${CMAKEDIR}"
3739
)
3840
else()
39-
install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/cmake/PackageProject/PackageProjectFiles"
41+
install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/cmake/PackageProject.cmake/PackageProjectFiles"
4042
DESTINATION "${PACKAGE_PROJECT_ROOT_PATH}/../"
4143
)
4244
endif()
4345

44-
message(STATUS "Use `find_package(PackageProject)` to use it.")
46+
message(STATUS "Use `find_package(PackageProject.cmake)` to use it.")
4547
endif()
4648

47-
include(${CMAKE_CURRENT_LIST_DIR}/cmake/PackageProject/PackageProjectConfig.cmake)
49+
include(${CMAKE_CURRENT_LIST_DIR}/cmake/PackageProject.cmake/PackageProject.cmakeConfig.cmake)
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/dependency/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ target_include_directories(
1515
)
1616

1717
if(${TEST_INSTALLED_VERSION_PACKAGEPROJECT})
18-
find_package(PackageProject)
18+
find_package(PackageProject.cmake)
1919
else()
2020
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../.. PackageProject)
2121
endif()

test/header_only/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ target_include_directories(
1515
)
1616

1717
if(${TEST_INSTALLED_VERSION_PACKAGEPROJECT})
18-
find_package(PackageProject)
18+
find_package(PackageProject.cmake)
1919
else()
2020
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../.. PackageProject)
2121
endif()

test/namespaced_dependency/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ target_include_directories(
1818
)
1919

2020
if(${TEST_INSTALLED_VERSION_PACKAGEPROJECT})
21-
find_package(PackageProject)
21+
find_package(PackageProject.cmake)
2222
else()
2323
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../.. PackageProject)
2424
endif()

test/runtime_destination_dependency/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ target_include_directories(
1616
)
1717

1818
if(${TEST_INSTALLED_VERSION_PACKAGEPROJECT})
19-
find_package(PackageProject)
19+
find_package(PackageProject.cmake)
2020
else()
2121
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../.. PackageProject)
2222
endif()

test/transitive_dependency/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ target_include_directories(
3737
)
3838

3939
if(${TEST_INSTALLED_VERSION_PACKAGEPROJECT})
40-
find_package(PackageProject)
40+
find_package(PackageProject.cmake)
4141
else()
4242
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../.. PackageProject)
4343
endif()

0 commit comments

Comments
 (0)