Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative or absolute CMAKE_INSTALL_XXXDIR variables. #16

Open
andre-caldas opened this issue May 23, 2024 · 4 comments · May be fixed by #17
Open

Relative or absolute CMAKE_INSTALL_XXXDIR variables. #16

andre-caldas opened this issue May 23, 2024 · 4 comments · May be fixed by #17

Comments

@andre-caldas
Copy link

I am not really familiar with cmake. I am very sorry if I am reporting something silly. :-)

I have used ogre-next-deps. I have setup CMAKE_CXX_FLAGS and CMAKE_INSTALL_PREFIX. This is the content of my src/CMakeLists.txt:

# This is the CMakeCache file.
# For build in directory: /home/andre/hd_extra/repositorios/ogre-next-deps/build
# It was generated by CMake: /usr/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.

########################
# EXTERNAL cache entries
########################

//Path to a program.
CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line

//Path to a program.
CMAKE_AR:FILEPATH=/usr/bin/ar

//Choose the type of build, options are: Debug, Release, RelWithDebInfo
CMAKE_BUILD_TYPE:STRING=Release

//Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON

//CXX compiler
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++

//A wrapper around 'ar' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-14

//A wrapper around 'ranlib' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-14

//Flags used by the CXX compiler during all build types.
CMAKE_CXX_FLAGS:STRING=-I/home/andre/.local/include

//Flags used by the CXX compiler during DEBUG builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g

//Flags used by the CXX compiler during MINSIZEREL builds.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

//Flags used by the CXX compiler during RELEASE builds.
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

//Flags used by the CXX compiler during RELWITHDEBINFO builds.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

//C compiler
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc

//A wrapper around 'ar' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-14

//A wrapper around 'ranlib' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-14

//Flags used by the C compiler during all build types.
CMAKE_C_FLAGS:STRING=

//Flags used by the C compiler during DEBUG builds.
CMAKE_C_FLAGS_DEBUG:STRING=-g

//Flags used by the C compiler during MINSIZEREL builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

//Flags used by the C compiler during RELEASE builds.
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

//Flags used by the C compiler during RELWITHDEBINFO builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

//Path to a program.
CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND

//Flags used by the linker during all build types.
CMAKE_EXE_LINKER_FLAGS:STRING=

//Flags used by the linker during DEBUG builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during MINSIZEREL builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during RELEASE builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during RELWITHDEBINFO builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Enable/Disable output of compile commands during generation.
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=

//Value Computed by CMake.
CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=/home/andre/hd_extra/repositorios/ogre-next-deps/build/CMakeFiles/pkgRedirects

//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/home/andre/.local

//Path to a program.
CMAKE_LINKER:FILEPATH=/usr/bin/ld

//Path to a program.
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake

//Flags used by the linker during the creation of modules during
// all build types.
CMAKE_MODULE_LINKER_FLAGS:STRING=

//Flags used by the linker during the creation of modules during
// DEBUG builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during the creation of modules during
// MINSIZEREL builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during the creation of modules during
// RELEASE builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during the creation of modules during
// RELWITHDEBINFO builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Path to a program.
CMAKE_NM:FILEPATH=/usr/bin/nm

//Path to a program.
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy

//Path to a program.
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump

//Value Computed by CMake
CMAKE_PROJECT_DESCRIPTION:STATIC=

//Value Computed by CMake
CMAKE_PROJECT_HOMEPAGE_URL:STATIC=

//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=OGREDEPS

//Path to a program.
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib

//Path to a program.
CMAKE_READELF:FILEPATH=/usr/bin/readelf

//Flags used by the linker during the creation of shared libraries
// during all build types.
CMAKE_SHARED_LINKER_FLAGS:STRING=

//Flags used by the linker during the creation of shared libraries
// during DEBUG builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during the creation of shared libraries
// during MINSIZEREL builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during the creation of shared libraries
// during RELEASE builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during the creation of shared libraries
// during RELWITHDEBINFO builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//If set, runtime paths are not added when installing shared libraries,
// but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO

//If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=NO

//Flags used by the linker during the creation of static libraries
// during all build types.
CMAKE_STATIC_LINKER_FLAGS:STRING=

//Flags used by the linker during the creation of static libraries
// during DEBUG builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during the creation of static libraries
// during MINSIZEREL builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during the creation of static libraries
// during RELEASE builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during the creation of static libraries
// during RELWITHDEBINFO builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Path to a program.
CMAKE_STRIP:FILEPATH=/usr/bin/strip

//Path to a program.
CMAKE_TAPI:FILEPATH=CMAKE_TAPI-NOTFOUND

//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make.  This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE

//Value Computed by CMake
OGREDEPS_BINARY_DIR:STATIC=/home/andre/hd_extra/repositorios/ogre-next-deps/build

//Build FreeImage dependency
OGREDEPS_BUILD_FREEIMAGE:BOOL=0

//Build FreeType dependency
OGREDEPS_BUILD_FREETYPE:BOOL=0

//Install prebuilt OpenVR dependency
OGREDEPS_BUILD_OPENVR:BOOL=ON

//Build rapidjson dependency
OGREDEPS_BUILD_RAPIDJSON:BOOL=ON

//Build Remotery dependency
OGREDEPS_BUILD_REMOTERY:BOOL=ON

//Build RenderDoc dependency
OGREDEPS_BUILD_RENDERDOC:BOOL=ON

//Build Vulkan's shaderc dependency
OGREDEPS_BUILD_SHADERC:BOOL=ON

//Build zlib dependency
OGREDEPS_BUILD_ZLIB:BOOL=0

//Build zziplib dependency
OGREDEPS_BUILD_ZZIPLIB:BOOL=ON

//Install development headers and libraries
OGREDEPS_INSTALL_DEV:BOOL=ON

//Value Computed by CMake
OGREDEPS_IS_TOP_LEVEL:STATIC=ON

//Install path for libraries, e.g. 'lib64' on some 64-bit Linux
// distros.
OGREDEPS_LIB_DIRECTORY:STRING=lib

//Value Computed by CMake
OGREDEPS_SOURCE_DIR:STATIC=/home/andre/hd_extra/repositorios/ogre-next-deps

//Value Computed by CMake
OPENVR_BINARY_DIR:STATIC=/home/andre/hd_extra/repositorios/ogre-next-deps/build/src/openvr

OPENVR_BIN_DIR:PATH=/home/andre/hd_extra/repositorios/ogre-next-deps/src/openvr/bin/linux64

OPENVR_INCLUDE_DIR:PATH=/home/andre/hd_extra/repositorios/ogre-next-deps/src/openvr/headers

//Value Computed by CMake
OPENVR_IS_TOP_LEVEL:STATIC=OFF

OPENVR_LIB_DIR:PATH=/home/andre/hd_extra/repositorios/ogre-next-deps/src/openvr/lib/linux64

//Value Computed by CMake
OPENVR_SOURCE_DIR:STATIC=/home/andre/hd_extra/repositorios/ogre-next-deps/src/openvr

//Value Computed by CMake
Remotery_BINARY_DIR:STATIC=/home/andre/hd_extra/repositorios/ogre-next-deps/build/src/Remotery

//Value Computed by CMake
Remotery_IS_TOP_LEVEL:STATIC=OFF

//Value Computed by CMake
Remotery_SOURCE_DIR:STATIC=/home/andre/hd_extra/repositorios/ogre-next-deps/src/Remotery

//Value Computed by CMake
RenderDoc_BINARY_DIR:STATIC=/home/andre/hd_extra/repositorios/ogre-next-deps/build/src/RenderDoc

//Value Computed by CMake
RenderDoc_IS_TOP_LEVEL:STATIC=OFF

//Value Computed by CMake
RenderDoc_SOURCE_DIR:STATIC=/home/andre/hd_extra/repositorios/ogre-next-deps/src/RenderDoc

//Value Computed by CMake
VulkanBasicSdk_BINARY_DIR:STATIC=/home/andre/hd_extra/repositorios/ogre-next-deps/build/src/vulkan/basic-sdk

VulkanBasicSdk_INCLUDE_DIR:PATH=/home/andre/hd_extra/repositorios/ogre-next-deps/src/vulkan/basic-sdk/include

//Value Computed by CMake
VulkanBasicSdk_IS_TOP_LEVEL:STATIC=OFF

VulkanBasicSdk_LIB_DIR:PATH=/home/andre/hd_extra/repositorios/ogre-next-deps/src/vulkan/basic-sdk/lib/linux64

//Value Computed by CMake
VulkanBasicSdk_SOURCE_DIR:STATIC=/home/andre/hd_extra/repositorios/ogre-next-deps/src/vulkan/basic-sdk

ZZip_INCLUDE_DIR:PATH=/home/andre/hd_extra/repositorios/ogre-next-deps/src/zziplib

ZZip_LIBRARY_DBG:STRING=zziplib

ZZip_LIBRARY_REL:STRING=zziplib

//Value Computed by CMake
rapidjson_BINARY_DIR:STATIC=/home/andre/hd_extra/repositorios/ogre-next-deps/build/src/rapidjson

rapidjson_INCLUDE_DIR:PATH=/home/andre/hd_extra/repositorios/ogre-next-deps/src/rapidjson

//Value Computed by CMake
rapidjson_IS_TOP_LEVEL:STATIC=OFF

//Value Computed by CMake
rapidjson_SOURCE_DIR:STATIC=/home/andre/hd_extra/repositorios/ogre-next-deps/src/rapidjson

//Value Computed by CMake
zziplib_BINARY_DIR:STATIC=/home/andre/hd_extra/repositorios/ogre-next-deps/build/src/zziplib

//Value Computed by CMake
zziplib_IS_TOP_LEVEL:STATIC=OFF

//Value Computed by CMake
zziplib_SOURCE_DIR:STATIC=/home/andre/hd_extra/repositorios/ogre-next-deps/src/zziplib


########################
# INTERNAL cache entries
########################

//ADVANCED property for variable: CMAKE_ADDR2LINE
CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_AR
CMAKE_AR-ADVANCED:INTERNAL=1
//This is the directory where this CMakeCache.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=/home/andre/hd_extra/repositorios/ogre-next-deps/build
//Major version of cmake used to create the current loaded cache
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
//Minor version of cmake used to create the current loaded cache
CMAKE_CACHE_MINOR_VERSION:INTERNAL=29
//Patch version of cmake used to create the current loaded cache
CMAKE_CACHE_PATCH_VERSION:INTERNAL=2
//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
//Path to cpack program executable.
CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
//Path to ctest program executable.
CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
//ADVANCED property for variable: CMAKE_CXX_COMPILER
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER_AR
CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_DLLTOOL
CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
//Path to cache edit program executable.
CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/ccmake
//Executable file format
CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
//Name of external makefile project generator.
CMAKE_EXTRA_GENERATOR:INTERNAL=
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
//Generator instance identifier.
CMAKE_GENERATOR_INSTANCE:INTERNAL=
//Name of generator platform.
CMAKE_GENERATOR_PLATFORM:INTERNAL=
//Name of generator toolset.
CMAKE_GENERATOR_TOOLSET:INTERNAL=
//Source directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=/home/andre/hd_extra/repositorios/ogre-next-deps
//Install .so files without execute permission.
CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1
//ADVANCED property for variable: CMAKE_LINKER
CMAKE_LINKER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_NM
CMAKE_NM-ADVANCED:INTERNAL=1
//number of local generators
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=8
//ADVANCED property for variable: CMAKE_OBJCOPY
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_OBJDUMP
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
//Platform information initialized
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RANLIB
CMAKE_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_READELF
CMAKE_READELF-ADVANCED:INTERNAL=1
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.29
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_RPATH
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STRIP
CMAKE_STRIP-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_TAPI
CMAKE_TAPI-ADVANCED:INTERNAL=1
//uname command
CMAKE_UNAME:INTERNAL=/usr/bin/uname
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
//Result of TRY_COMPILE
HAVE_OGREDEPS_PTR_SIZE:INTERNAL=TRUE
//ADVANCED property for variable: OGREDEPS_LIB_DIRECTORY
OGREDEPS_LIB_DIRECTORY-ADVANCED:INTERNAL=1
//CHECK_TYPE_SIZE: sizeof(void*)
OGREDEPS_PTR_SIZE:INTERNAL=8
//ADVANCED property for variable: OPENVR_BIN_DIR
OPENVR_BIN_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OPENVR_INCLUDE_DIR
OPENVR_INCLUDE_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OPENVR_LIB_DIR
OPENVR_LIB_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: VulkanBasicSdk_INCLUDE_DIR
VulkanBasicSdk_INCLUDE_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: VulkanBasicSdk_LIB_DIR
VulkanBasicSdk_LIB_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: ZZip_INCLUDE_DIR
ZZip_INCLUDE_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: ZZip_LIBRARY_DBG
ZZip_LIBRARY_DBG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: ZZip_LIBRARY_REL
ZZip_LIBRARY_REL-ADVANCED:INTERNAL=1
//linker supports push/pop state
_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE
//ADVANCED property for variable: rapidjson_INCLUDE_DIR
rapidjson_INCLUDE_DIR-ADVANCED:INTERNAL=1

Now, I have realized that the generated files pkgconfig/shaderc*.pc give a wrong libdir:

prefix=/home/andre/.local
exec_prefix=${prefix}
libdir=${prefix}//home/andre/.local/lib
includedir=${prefix}/include

Name: shaderc
Description: Tools and libraries for Vulkan shader compilation
Version: 2020.2.1
URL: https://github.com/google/shaderc

Libs: -L${libdir} -lshaderc_shared
Cflags: -I${includedir}

I do not really understand much... but I see two options:

  1. @CMAKE_INSTALL_LIBDIR@ should simply be lib, but it is being configured with an absolute path. The file ./build/src/shaderc-prefix/tmp/shaderc-cfgcmd.txt contains -DCMAKE_INSTALL_PREFIX:PATH=/home/andre/.local;-DCMAKE_INSTALL_LIBDIR:PATH=/home/andre/.local/lib/;-DCMAKE_INSTALL_BINDIR:PATH=/home/andre/.local/bin/.
  2. In the case of includedir, ${prefix} should not be there either. And "two wrongs made a right", because @CMAKE_INSTALL_INCLUDEDIR@ is relative, not absolute.

The template files are like this:

prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@

Name: shaderc
Description: Tools and libraries for Vulkan shader compilation
Version: @CURRENT_VERSION@
URL: https://github.com/google/shaderc

Libs: -L${libdir} @LIBS@
Cflags: -I${includedir}

Maybe none of them (libdir or includedir) should have a ${prefix}/. It is strange, in my opinion, that @CMAKE_INSTALL_INCLUDEDIR@ actually gives a relative include path, instead of an absolute path. But this is also true for SYSCONFDIR, DATAROOTDIR, etc.

I do not really know which one is the correct one. But making all those XXXDIR relative to PREFIX is what makes more sense. In this case, BINDIR and LIBDIR are wrong.

andre-caldas added a commit to andre-caldas/ogre-next-deps that referenced this issue May 23, 2024
@andre-caldas andre-caldas linked a pull request May 23, 2024 that will close this issue
@darksylinc
Copy link
Member

Hi!

Could you provide steps to reproduce and environment (distro, compiler version, etc)?

Additionally some background of why you needed to customize CMAKE_INSTALL_PREFIX would help.

Thanks.

@andre-caldas
Copy link
Author

andre-caldas commented May 23, 2024

Could you provide steps to reproduce and environment (distro, compiler version, etc)?

I use Debian unstable, but it seems my compiler is from "experimental". Environment info (with some superfluous data removed):

$ g++ --version
g++ (Debian 14-20240429-1) 14.0.1 20240429 (experimental) [gcc-14 r14-10144-g41d7a8ceaaa]

$ cmake --version
cmake version 3.29.3

Additionally some background of why you needed to customize CMAKE_INSTALL_PREFIX would help.

I don't really need... I just wanted to. :-)
I wanted to have everything installed to my local /home/andre/.local/.

Everything worked fine and OGRE 4.0 is working, thanks to you guys. I also got OGRE installed to my .local directory.

Trying to learn Ogre, I have noticed those files I have mentioned, but I don't really know what they are and how they affect me. :-)

I guess that regardless of my needs, CMAKE_INSTALL_LIBDIR and the sort are supposed to be relative to prefix. If not, it shall be considered a bug, IMHO. I have submitted a PR that follows the cmake specs:

https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html

@darksylinc
Copy link
Member

I assume you ran ?

cmake ..  -DCMAKE_INSTALL_PREFIX=/home/andre/.local/

I don't really need... I just wanted to. :-)

Gotcha. The thing is this repo is only meant to build dependencies for ogre-next to pick up. By default this repo doesn't even install in any system path: it installs into a local folder (inside the build you told CMake).

And the main issue is that we'd have to test all platforms we support to ensure nothing broke.

That is why I will have to reject your PR unless you have objections.

Cheers
Matias

@andre-caldas
Copy link
Author

andre-caldas commented May 26, 2024

And the main issue is that we'd have to test all platforms we support to ensure nothing broke.
That is why I will have to reject your PR unless you have objections.

You do not need to officially support the thing. As per CMake documentation, the current version is wrong and the PR makes it right. This is regardless of anything.
https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html

If you say you do not support PREFIX... by observing the submitted PR you will notice that the patch actually removes certain mentions to the variable CMAKE_INSTALL_PREFIX you claim not to support. If you do not support it, and the thing is actually wrong... nothing more correct than removing it. ;-)

But I do not have "objections". I am to new here to have "objections". But I do hope I have changed your mind. :-)

Just keep up the great work and I am happy! Please, feel very comfortable to make your decision. I shall not complain. :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants