Lower-case PROJECT_NAME variable to fix CMAKE_INSTALL_DOCDIR

As PROJECT_NAME = OPENJPEG the generated value for CMAKE_INSTALL_DOCDIR
becomes $DATAROOTDIR/doc/OPENJPEG. Fix by lowercasing PROJECT_NAME
immediately before including GNUInstallDirs.
This commit is contained in:
Thomas Bracht Laumann Jespersen 2022-05-24 21:10:58 +02:00
parent 63fac9ee33
commit 8ade1306ae
1 changed files with 2 additions and 2 deletions

View File

@ -105,13 +105,13 @@ endif()
# --------------------------------------------------------------------------
# Install directories
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME)
include(GNUInstallDirs)
# Build DOCUMENTATION (not in ALL target and only if Doxygen is found)
option(BUILD_DOC "Build the HTML documentation (with doxygen if available)." OFF)
string(TOLOWER ${PROJECT_NAME} projectname)
set(OPENJPEG_INSTALL_SUBDIR "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
set(OPENJPEG_INSTALL_SUBDIR "${PROJECT_NAME}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
if(NOT OPENJPEG_INSTALL_JNI_DIR)
if(WIN32)