-
Notifications
You must be signed in to change notification settings - Fork 235
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
[FindOGRE.cmake] Restricting search to only ogre-next library #470
Comments
Also, how is
It seems this is intended for use only at Ogre build time, where |
Seems the |
Seems this 6 years old commit (!) is missing from this repository, but found in the original ogre one?
|
Here's an old forum discussion about the placement of the FindOGRE.cmake It seems like the cmake integration is based around either working with a in-project source distribution (as is done in ogre.cmake in the samples) or copying and modifying the FindOGRE.cmake into projects using the library. Neither are good options, the first obviously does not work for distributed binaries and the second places the maintenance burden of the cmake integration onto downstream projects. Right now, it looks to me like using pkg-config from cmake is the best option. At least the project has a unique name now, so it should be easier to use than before. |
OK, thanks for the link. Yeah, the situation can be improved to simply detect using a CMake config file, as is the norm for most CMake projects. For now, backporting (fowardporting?) some CMake fixes from the old Ogre repo appears to resolve my immediate issue (as long as I set CMAKE_MODULE_PATH manually before attempting to build mygui-next), see #474. |
Just be aware that if both ogre (classic) and ogre-next are installed, the FindOGRE module in ogre-next will also find and set quite a few cmake variables for ogre (classic).
|
Ack; I can see this being an issue for File Hierarchy Standard systems like Debian, but it's not as much an issue for a functional ones like Guix, where everything is neatly separated under its own prefix and can be composed as needed (instead of globally made available). |
Did a quick test with FindOGRE.cmake in v3.0.0 using the following CMakeLists to print the defined variables. Defining MODULE ensures that FindOGRE from ogre-next is used, as regular ogre uses CONFIG. I first ran this with only ogre-next (v3.0.0) installed, then installed alongside ogre (v14.3.1). Clearly, a lot of the CMake variables are being overridden when ogre is present. OGRE_VERSION, OGRE_INCLUDE_DIR, OGRE_CONFIG_INCLUDE_DIR, to mention a few. cmake_minimum_required(VERSION 3.22)
project(ogre-test)
list(APPEND CMAKE_MODULE_PATH "/usr/lib/OGRE-Next/cmake")
find_package(OGRE REQUIRED MODULE)
get_cmake_property(_variableNames VARIABLES)
list (SORT _variableNames)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach() - Package 'OGRE', required by 'virtual:world', not found
- Found Ogre Eris (3.0.0)
+ Found OGRE, version 14.3.1
+ Found Ogre (..)
- Could not locate OGRE_Paging
+ Found OGRE_Paging: optimized;/usr/lib/libOgrePaging.so;debug;/usr/lib/libOgrePaging.so
- Could not locate OGRE_Terrain
+ Found OGRE_Terrain: optimized;/usr/lib/libOgreTerrain.so;debug;/usr/lib/libOgreTerrain.so
- Could not locate OGRE_Property
+ Found OGRE_Property: optimized;/usr/lib/libOgreProperty.so;debug;/usr/lib/libOgreProperty.so
- Could not locate OGRE_Volume
+ Found OGRE_Volume: optimized;/usr/lib/libOgreVolume.so;debug;/usr/lib/libOgreVolume.so
- Found OGRE_HlmsPbs: optimized;/usr/lib/libOgreNextHlmsPbs.so;debug;/usr/lib/libOgreNextHlmsPbs.so
+ Could not locate OGRE_HlmsPbs
- Found OGRE_HlmsUnlit: optimized;/usr/lib/libOgreNextHlmsUnlit.so;debug;/usr/lib/libOgreNextHlmsUnlit.so
+ Could not locate OGRE_HlmsUnlit
- OGRE_CONFIG_FREEIMAGE=1
- OGRE_CONFIG_HEADER=/usr/include/OGRE-Next//OgreBuildSettings.h
- OGRE_CONFIG_HEADERS=/usr/include/OGRE-Next//OgreBuildSettings.h;/usr/include/OGRE-Next//OgreConfig.h
- OGRE_CONFIG_INCLUDE_DIR=/usr/include/OGRE-Next/
+ OGRE_CONFIG_HEADER=/usr/include/OGRE//OgreBuildSettings.h
+ OGRE_CONFIG_HEADERS=/usr/include/OGRE//OgreBuildSettings.h;/usr/include/OGRE//OgreConfig.h
+ OGRE_CONFIG_INCLUDE_DIR=/usr/include/OGRE/
- OGRE_CONFIG_THREADS=1
+ OGRE_CONFIG_THREADS=3
- OGRE_HlmsPbs_FOUND=TRUE
- OGRE_HlmsPbs_INCLUDE_DIR=/usr/include/OGRE-Next/Hlms/Pbs
- OGRE_HlmsPbs_INCLUDE_DIRS=/usr/include/OGRE-Next/Hlms/Pbs
- OGRE_HlmsPbs_LIBRARIES=optimized;/usr/lib/libOgreNextHlmsPbs.so;debug;/usr/lib/libOgreNextHlmsPbs.so
+ OGRE_HlmsPbs_INCLUDE_DIR=OGRE_HlmsPbs_INCLUDE_DIR-NOTFOUND
- OGRE_HlmsUnlit_FOUND=TRUE
- OGRE_HlmsUnlit_INCLUDE_DIR=/usr/include/OGRE-Next/Hlms/Unlit
- OGRE_HlmsUnlit_INCLUDE_DIRS=/usr/include/OGRE-Next/Hlms/Unlit
- OGRE_HlmsUnlit_LIBRARIES=optimized;/usr/lib/libOgreNextHlmsUnlit.so;debug;/usr/lib/libOgreNextHlmsUnlit.so
+ OGRE_HlmsUnlit_INCLUDE_DIR=OGRE_HlmsUnlit_INCLUDE_DIR-NOTFOUND
- OGRE_INCLUDE_DIR=/usr/include/OGRE-Next/
- OGRE_INCLUDE_DIR=/usr/include/OGRE-Next/
- OGRE_INCLUDE_DIRS=/usr/include/OGRE-Next/;/usr/include
+ OGRE_INCLUDE_DIR=/usr/include/OGRE/
+ OGRE_INCLUDE_DIR=/usr/include/OGRE/
+ OGRE_INCLUDE_DIRS=/usr/include/OGRE/;/usr/include
- OGRE_Overlay_INCLUDE_DIR=/usr/include/OGRE-Next/Overlay/
- OGRE_Overlay_INCLUDE_DIRS=/usr/include/OGRE-Next/Overlay/
+ OGRE_Overlay_INCLUDE_DIR=/usr/include/OGRE/Overlay/
+ OGRE_Overlay_INCLUDE_DIRS=/usr/include/OGRE/Overlay/
- OGRE_PKGC_CFLAGS=
+ OGRE_PKGC_CFLAGS=-I/usr/include/OGRE;-pthread
- OGRE_PKGC_CFLAGS_OTHER=
- OGRE_PKGC_FOUND=
- OGRE_PKGC_INCLUDEDIR=
- OGRE_PKGC_INCLUDE_DIRS=/usr/include;/usr/include/OGRE-Next
- OGRE_PKGC_LDFLAGS=-L/usr/lib;-lOgreNextMain;-lpthread
+ OGRE_PKGC_CFLAGS_OTHER=-pthread
+ OGRE_PKGC_FOUND=1
+ OGRE_PKGC_INCLUDEDIR=/usr/include
+ OGRE_PKGC_INCLUDE_DIRS=/usr/include/OGRE
+ OGRE_PKGC_LDFLAGS=-L/usr/lib;-lOgreMain;-lpthread
- OGRE_PKGC_LIBDIR=
- OGRE_PKGC_LIBRARIES=OgreNextMain;pthread
+ OGRE_PKGC_LIBDIR=/usr/lib
+ OGRE_PKGC_LIBRARIES=OgreMain;pthread
- OGRE_PKGC_LINK_LIBRARIES=/usr/lib/libOgreNextMain.so;/usr/lib/libpthread.a
- OGRE_PKGC_MODULE_NAME=
+ OGRE_PKGC_LINK_LIBRARIES=/usr/lib/libOgreMain.so;/usr/lib/libpthread.a
+ OGRE_PKGC_MODULE_NAME=OGRE
- OGRE_PKGC_PREFIX=
- OGRE_PKGC_STATIC_CFLAGS=
+ OGRE_PKGC_PREFIX=/usr
+ OGRE_PKGC_STATIC_CFLAGS=-I/usr/include/OGRE;-pthread
- OGRE_PKGC_STATIC_CFLAGS_OTHER=
- OGRE_PKGC_STATIC_INCLUDE_DIRS=/usr/include;/usr/include/OGRE-Next
- OGRE_PKGC_STATIC_LDFLAGS=-L/usr/lib;-lOgreNextMain;-lpthread
+ OGRE_PKGC_STATIC_CFLAGS_OTHER=-pthread
+ OGRE_PKGC_STATIC_INCLUDE_DIRS=/usr/include/OGRE
+ OGRE_PKGC_STATIC_LDFLAGS=-L/usr/lib;-lOgreMain;-lpthread
- OGRE_PKGC_STATIC_LIBRARIES=OgreNextMain;pthread
+ OGRE_PKGC_STATIC_LIBRARIES=OgreMain;pthread
- OGRE_PKGC_VERSION=
- OGRE_PLUGIN_DIR_DBG=
- OGRE_PLUGIN_DIR_REL=
- OGRE_PLUGIN_DIR_TMP=
+ OGRE_PKGC_VERSION=14.3.1
+ OGRE_PLUGIN_DIR_DBG=/lib/OGRE
+ OGRE_PLUGIN_DIR_REL=/lib/OGRE
+ OGRE_PLUGIN_DIR_TMP=/lib/OGRE
- OGRE_Paging_INCLUDE_DIR=OGRE_Paging_INCLUDE_DIR-NOTFOUND
- OGRE_Paging_LIBRARY_DBG=OGRE_Paging_LIBRARY_DBG-NOTFOUND
+ OGRE_Paging_FOUND=TRUE
+ OGRE_Paging_INCLUDE_DIR=/usr/include/OGRE/Paging/
+ OGRE_Paging_INCLUDE_DIRS=/usr/include/OGRE/Paging/
+ OGRE_Paging_LIBRARIES=optimized;/usr/lib/libOgrePaging.so;debug;/usr/lib/libOgrePaging.so
+ OGRE_Paging_LIBRARY=optimized;/usr/lib/libOgrePaging.so;debug;/usr/lib/libOgrePaging.so
+ OGRE_Paging_LIBRARY_DBG=/usr/lib/libOgrePaging.so
- OGRE_Paging_LIBRARY_REL=OGRE_Paging_LIBRARY_REL-NOTFOUND
+ OGRE_Paging_LIBRARY_REL=/usr/lib/libOgrePaging.so
- OGRE_Plugin_ParticleFX_INCLUDE_DIR=/usr/include/OGRE-Next/Plugins/ParticleFX/
- OGRE_Plugin_ParticleFX_INCLUDE_DIRS=/usr/include/OGRE-Next/Plugins/ParticleFX/
- OGRE_Plugin_ParticleFX_LIBRARY_DBG=OGRE_Plugin_ParticleFX_LIBRARY_DBG-NOTFOUND
+ OGRE_Plugin_ParticleFX_INCLUDE_DIR=/usr/include/OGRE/Plugins/ParticleFX/
+ OGRE_Plugin_ParticleFX_INCLUDE_DIRS=/usr/include/OGRE/Plugins/ParticleFX/
+ OGRE_Plugin_ParticleFX_LIBRARIES=optimized;/lib/OGRE/Plugin_ParticleFX.so;debug;/lib/OGRE/Plugin_ParticleFX.so
+ OGRE_Plugin_ParticleFX_LIBRARY=optimized;/lib/OGRE/Plugin_ParticleFX.so;debug;/lib/OGRE/Plugin_ParticleFX.so
+ OGRE_Plugin_ParticleFX_LIBRARY_DBG=/lib/OGRE/Plugin_ParticleFX.so
- OGRE_Plugin_ParticleFX_LIBRARY_REL=OGRE_Plugin_ParticleFX_LIBRARY_REL-NOTFOUND
- OGRE_Property_INCLUDE_DIR=OGRE_Property_INCLUDE_DIR-NOTFOUND
- OGRE_Property_LIBRARY_DBG=OGRE_Property_LIBRARY_DBG-NOTFOUND
+ OGRE_Plugin_ParticleFX_LIBRARY_REL=/lib/OGRE/Plugin_ParticleFX.so
+ OGRE_Property_FOUND=TRUE
+ OGRE_Property_INCLUDE_DIR=/usr/include/OGRE/Property
+ OGRE_Property_INCLUDE_DIRS=/usr/include/OGRE/Property
+ OGRE_Property_LIBRARIES=optimized;/usr/lib/libOgreProperty.so;debug;/usr/lib/libOgreProperty.so
+ OGRE_Property_LIBRARY=optimized;/usr/lib/libOgreProperty.so;debug;/usr/lib/libOgreProperty.so
+ OGRE_Property_LIBRARY_DBG=/usr/lib/libOgreProperty.so
- OGRE_Property_LIBRARY_REL=OGRE_Property_LIBRARY_REL-NOTFOUND
+ OGRE_Property_LIBRARY_REL=/usr/lib/libOgreProperty.so
- OGRE_RenderSystem_GL3Plus_INCLUDE_DIR=/usr/include/OGRE-Next/RenderSystems/GL3Plus/
- OGRE_RenderSystem_GL3Plus_INCLUDE_DIRS=/usr/include/OGRE-Next/RenderSystems/GL3Plus/
- OGRE_RenderSystem_GL3Plus_LIBRARY_DBG=OGRE_RenderSystem_GL3Plus_LIBRARY_DBG-NOTFOUND
+ OGRE_RenderSystem_GL3Plus_INCLUDE_DIR=/usr/include/OGRE/RenderSystems/GL3Plus/
+ OGRE_RenderSystem_GL3Plus_INCLUDE_DIRS=/usr/include/OGRE/RenderSystems/GL3Plus/
+ OGRE_RenderSystem_GL3Plus_LIBRARIES=optimized;/lib/OGRE/RenderSystem_GL3Plus.so;debug;/lib/OGRE/RenderSystem_GL3Plus.so
+ OGRE_RenderSystem_GL3Plus_LIBRARY=optimized;/lib/OGRE/RenderSystem_GL3Plus.so;debug;/lib/OGRE/RenderSystem_GL3Plus.so
+ OGRE_RenderSystem_GL3Plus_LIBRARY_DBG=/lib/OGRE/RenderSystem_GL3Plus.so
- OGRE_RenderSystem_GL3Plus_LIBRARY_REL=OGRE_RenderSystem_GL3Plus_LIBRARY_REL-NOTFOUND
- OGRE_RenderSystem_GLES2_INCLUDE_DIR=OGRE_RenderSystem_GLES2_INCLUDE_DIR-NOTFOUND
- OGRE_RenderSystem_GLES2_LIBRARY_DBG=OGRE_RenderSystem_GLES2_LIBRARY_DBG-NOTFOUND
+ OGRE_RenderSystem_GL3Plus_LIBRARY_REL=/lib/OGRE/RenderSystem_GL3Plus.so
+ OGRE_RenderSystem_GLES2_FOUND=TRUE
+ OGRE_RenderSystem_GLES2_INCLUDE_DIR=/usr/include/OGRE/RenderSystems/GLES2/
+ OGRE_RenderSystem_GLES2_INCLUDE_DIRS=/usr/include/OGRE/RenderSystems/GLES2/
+ OGRE_RenderSystem_GLES2_LIBRARIES=optimized;/lib/OGRE/RenderSystem_GLES2.so;debug;/lib/OGRE/RenderSystem_GLES2.so
+ OGRE_RenderSystem_GLES2_LIBRARY=optimized;/lib/OGRE/RenderSystem_GLES2.so;debug;/lib/OGRE/RenderSystem_GLES2.so
+ OGRE_RenderSystem_GLES2_LIBRARY_DBG=/lib/OGRE/RenderSystem_GLES2.so
- OGRE_RenderSystem_GLES2_LIBRARY_REL=OGRE_RenderSystem_GLES2_LIBRARY_REL-NOTFOUND
- OGRE_Terrain_INCLUDE_DIR=OGRE_Terrain_INCLUDE_DIR-NOTFOUND
- OGRE_Terrain_LIBRARY_DBG=OGRE_Terrain_LIBRARY_DBG-NOTFOUND
+ OGRE_RenderSystem_GLES2_LIBRARY_REL=/lib/OGRE/RenderSystem_GLES2.so
+ OGRE_Terrain_FOUND=TRUE
+ OGRE_Terrain_INCLUDE_DIR=/usr/include/OGRE/Terrain
+ OGRE_Terrain_INCLUDE_DIRS=/usr/include/OGRE/Terrain
+ OGRE_Terrain_LIBRARIES=optimized;/usr/lib/libOgreTerrain.so;debug;/usr/lib/libOgreTerrain.so
+ OGRE_Terrain_LIBRARY=optimized;/usr/lib/libOgreTerrain.so;debug;/usr/lib/libOgreTerrain.so
+ OGRE_Terrain_LIBRARY_DBG=/usr/lib/libOgreTerrain.so
- OGRE_Terrain_LIBRARY_REL=OGRE_Terrain_LIBRARY_REL-NOTFOUND
- OGRE_VERSION=3.0.0
- OGRE_VERSION_MAJOR=3
- OGRE_VERSION_MINOR=0
- OGRE_VERSION_NAME=Eris
- OGRE_VERSION_PATCH=0
- OGRE_Volume_INCLUDE_DIR=OGRE_Volume_INCLUDE_DIR-NOTFOUND
- OGRE_Volume_LIBRARY_DBG=OGRE_Volume_LIBRARY_DBG-NOTFOUND
+ OGRE_Terrain_LIBRARY_REL=/usr/lib/libOgreTerrain.so
+ OGRE_VERSION=..
+ OGRE_Volume_FOUND=TRUE
+ OGRE_Volume_INCLUDE_DIR=/usr/include/OGRE/Volume/
+ OGRE_Volume_INCLUDE_DIRS=/usr/include/OGRE/Volume/
+ OGRE_Volume_LIBRARIES=optimized;/usr/lib/libOgreVolume.so;debug;/usr/lib/libOgreVolume.so
+ OGRE_Volume_LIBRARY=optimized;/usr/lib/libOgreVolume.so;debug;/usr/lib/libOgreVolume.so
+ OGRE_Volume_LIBRARY_DBG=/usr/lib/libOgreVolume.so
- OGRE_Volume_LIBRARY_REL=OGRE_Volume_LIBRARY_REL-NOTFOUND
+ OGRE_Volume_LIBRARY_REL=/usr/lib/libOgreVolume.so
- PREPROC_TEMP_VAR=#define OGRE_NO_FREEIMAGE 1
+ PREPROC_TEMP_VAR=
- __pkg_config_arguments_OGRE_PKGC=OGRE-Next
+ __pkg_config_arguments_OGRE_PKGC=OGRE
- _pkg_check_modules_failed= - OGRE
+ _pkg_check_modules_failed=
- _pkgconfig_CFLAGS=-I/usr/include;-I/usr/include/OGRE-Next;-pthread
+ _pkgconfig_CFLAGS=-I/usr/include/OGRE;-pthread
- _pkgconfig_INCLUDE_DIRS=/usr/include;/usr/include/OGRE-Next
- _pkgconfig_LDFLAGS=-L/usr/lib;-lOgreNextMain;-lpthread
- _pkgconfig_LIBRARIES=OgreNextMain;pthread
+ _pkgconfig_INCLUDE_DIRS=/usr/include/OGRE
+ _pkgconfig_LDFLAGS=-L/usr/lib;-lOgreMain;-lpthread
+ _pkgconfig_LIBRARIES=OgreMain;pthread
- _pkgconfig_STATIC_CFLAGS=-I/usr/include;-I/usr/include/OGRE-Next;-pthread
+ _pkgconfig_STATIC_CFLAGS=-I/usr/include/OGRE;-pthread
- _pkgconfig_STATIC_INCLUDE_DIRS=/usr/include;/usr/include/OGRE-Next
- _pkgconfig_STATIC_LDFLAGS=-L/usr/lib;-lOgreNextMain;-lpthread
- _pkgconfig_STATIC_LIBRARIES=OgreNextMain;pthread
+ _pkgconfig_STATIC_INCLUDE_DIRS=/usr/include/OGRE
+ _pkgconfig_STATIC_LDFLAGS=-L/usr/lib;-lOgreMain;-lpthread
+ _pkgconfig_STATIC_LIBRARIES=OgreMain;pthread
- _pkgconfig_VERSION=3.0.0
- _pkgconfig_error=Package 'OGRE', required by 'virtual:world', not found
+ _pkgconfig_VERSION=14.3.1
+ _pkgconfig_error=
- _pkgconfig_retval=1
+ _pkgconfig_retval=0
+ pkgcfg_lib_OGRE_PKGC_OgreMain=/usr/lib/libOgreMain.so |
Thanks for the visualizer! |
The FindOGRE.cmake module finds both ogre and ogre-next if both are installed. Is it possible to restrict the search to only ogre next? Specifically with the new ogre-next project naming.
The text was updated successfully, but these errors were encountered: