Skip to content

Commit

Permalink
FindOgre missing functionality OGRE-Next pkg-config (#346)
Browse files Browse the repository at this point in the history
Fixes #346
  • Loading branch information
darksylinc committed Nov 1, 2023
1 parent b065174 commit 491d37d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMake/Packages/FindOGRE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,9 @@ set(OGRE_PREFIX_WATCH ${OGRE_PREFIX_PATH} ${OGRE_PREFIX_SOURCE} ${OGRE_PREFIX_BU
clear_if_changed(OGRE_PREFIX_WATCH ${OGRE_RESET_VARS})

if(NOT OGRE_STATIC)
# try to locate Ogre via pkg-config
use_pkgconfig(OGRE_PKGC "OGRE${OGRE_LIB_SUFFIX}")
# try to locate Ogre via pkg-config
use_pkgconfig(OGRE_PKGC "OGRE-Next${OGRE_LIB_SUFFIX}")
use_pkgconfig(OGRE_PKGC "OGRE${OGRE_LIB_SUFFIX}")

# Set the framework search path for OS X
set(OGRE_FRAMEWORK_SEARCH_PATH
Expand Down Expand Up @@ -396,7 +397,7 @@ set(OGRE_COMPONENT_SEARCH_PATH_DBG
macro(ogre_find_component COMPONENT HEADER PATH_HINTS)
set(OGRE_${COMPONENT}_FIND_QUIETLY ${OGRE_FIND_QUIETLY})
findpkg_begin(OGRE_${COMPONENT})
find_path(OGRE_${COMPONENT}_INCLUDE_DIR NAMES ${HEADER} HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES ${PATH_HINTS} ${COMPONENT} OGRE/${COMPONENT} )
find_path(OGRE_${COMPONENT}_INCLUDE_DIR NAMES ${HEADER} HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES ${PATH_HINTS} ${COMPONENT} OGRE-Next/${COMPONENT} OGRE/${COMPONENT} )
set(OGRE_${COMPONENT}_LIBRARY_NAMES "OgreNext${COMPONENT}${OGRE_LIB_SUFFIX}" "Ogre${COMPONENT}${OGRE_LIB_SUFFIX}")
get_debug_names(OGRE_${COMPONENT}_LIBRARY_NAMES)
find_library(OGRE_${COMPONENT}_LIBRARY_REL NAMES ${OGRE_${COMPONENT}_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} ${OGRE_FRAMEWORK_PATH} PATH_SUFFIXES "" "Release" "RelWithDebInfo" "MinSizeRel")
Expand Down

0 comments on commit 491d37d

Please sign in to comment.