Skip to content

Commit 2f3dcce

Browse files
kbeversmwtoews
andcommitted
Avoid using upper case project name in doc install dir (#3299)
Closes #3296 Co-authored-by: Mike Taves <[email protected]>
1 parent cc8970d commit 2f3dcce

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

CMakeLists.txt

+13
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,20 @@ link_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
291291
# Installation
292292
################################################################################
293293
include(ProjInstallPath)
294+
295+
# By default GNUInstallDirs will use the upper case project name
296+
# for CMAKE_INSTALL_DOCDIR, resulting in something like share/doc/PROJ
297+
# instead of share/doc/proj which historically have been the path used
298+
# by the project.
299+
# Here force the use of a lower case project name and reset after
300+
# GNUInstallDirs has done its thing
301+
set(PROJECT_NAME_ORIGINAL "${PROJECT_NAME}")
302+
string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME)
303+
294304
include(GNUInstallDirs)
305+
306+
set(PROJECT_NAME "${PROJECT_NAME_ORIGINAL}")
307+
295308
set(PROJ_DATA_PATH "${CMAKE_INSTALL_FULL_DATADIR}/proj")
296309

297310
################################################################################

0 commit comments

Comments
 (0)