Hi, this is not exactly what I was looking for. I found some references for vcpkg here: https://ogrecave.github.io/ogre/api/1.1 ... otoc_md253 so I thought that it should be easy. Anyway I got it working - at least my project is created and compilable and it seems that all folders to Ogre are setup properly - I will check it later when I get running some simple rendering in my app's window.
For now here are some points which I needed to setup to get it working:
1. it is necessary to install pkgconf and ogre-next through vcpkg:
Code: Select all
vcpkg.exe install pkgconf
vcpkg.exe install ogre-next
2. export the package:
Code: Select all
vcpkg.exe export ogre-next pkgconf --7zip --host-triplet=x64-windows --output-dir=./out --output=my-ogre-vcpkg
3. in your main CMakeLists.txt file add "connection" to vcpkg:
Code: Select all
# configure vcpkg
SET(MyProject_ExtDepDir ...) <--- set the path to project's external dependencies
SET(MyProject_vcpkg_VER my-ogre-vcpkg)
SET(CMAKE_TOOLCHAIN_FILE ${MyProject_ExtDepDir}/vcpkg/${MyProject_vcpkg_VER}/scripts/buildsystems/vcpkg.cmake)
SET(VCPKG_TARGET_TRIPLET x64-windows)
4. setup path for OGRE finder script:
Code: Select all
# OGRE
LIST(PREPEND CMAKE_MODULE_PATH ${MyProject_MAIN_DIR}/cmake)
LIST(PREPEND CMAKE_MODULE_PATH ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/ogre-next)
SET(PKG_CONFIG_EXECUTABLE ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/pkgconf/pkgconf.exe)
SET(OGRE_INC_SEARCH_PATH ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/OGRE-Next)
SET(OGRE_LIB_SEARCH_PATH ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/OGRE-Next ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/OGRE-Next)
SET(OGRE_BIN_SEARCH_PATH ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin)
5. add find for the OGRE and include:
Code: Select all
FIND_PACKAGE(OGRE REQUIRED)
INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR})
6. add linking with OGRE:
Code: Select all
TARGET_LINK_LIBRARIES(MyProject ${OGRE_LIBRARY})
This at least work for me .. I will se later whether I will get some other problems.
I think the vcpkg is maintained by Microsoft, but I am not sure who maintain specifically ogre and ogre-next within the vcpkg. It is possible that there are external maintainers. Anyway the compilation and installing of ogre through vcpkg is so easy that it will be perfect to get some notes about it to ogre's wiki including the information how to use ogre through it.