diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-01-19 03:36:05 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-01-19 03:36:05 +0000 |
| commit | 9c80a09fc7f096fd05526876f9d8330108bb9c69 (patch) | |
| tree | 0f79dccbcc738bcaddb3b8a19cf4e841dfa65c89 | |
| parent | Updated core (diff) | |
| download | DiligentEngine-9c80a09fc7f096fd05526876f9d8330108bb9c69.tar.gz DiligentEngine-9c80a09fc7f096fd05526876f9d8330108bb9c69.zip | |
Improved Diligent Core installation process
| -rw-r--r-- | .travis.yml | 18 | ||||
| m--------- | DiligentCore | 0 | ||||
| -rw-r--r-- | README.md | 24 |
3 files changed, 32 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml index a617677..eb82d21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,14 +7,16 @@ notifications: on_success: never on_failure: always +env: + global: + - CMAKE_VERSION=3.13.2 + before_install: - | if [ "$TRAVIS_OS_NAME" = "osx" ]; then - if brew ls --versions cmake > /dev/null; then - echo cmake already installed. - else - brew install cmake - fi; + wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Darwin-x86_64.tar.gz + tar -xzf cmake-${CMAKE_VERSION}-Darwin-x86_64.tar.gz + export PATH=$PWD/cmake-${CMAKE_VERSION}-Darwin-x86_64/CMake.app/Contents/bin:$PATH cmake --version fi - | @@ -31,9 +33,9 @@ before_install: # Download a recent cmake mkdir $HOME/usr export PATH="$HOME/usr/bin:$PATH" - wget https://github.com/Kitware/CMake/releases/download/v3.13.2/cmake-3.13.2-Linux-x86_64.sh - chmod +x cmake-3.13.2-Linux-x86_64.sh - ./cmake-3.13.2-Linux-x86_64.sh --prefix=$HOME/usr --exclude-subdir --skip-license + wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh + chmod +x cmake-${CMAKE_VERSION}-Linux-x86_64.sh + ./cmake-${CMAKE_VERSION}-Linux-x86_64.sh --prefix=$HOME/usr --exclude-subdir --skip-license cmake --version fi diff --git a/DiligentCore b/DiligentCore -Subproject 03abb6a1c1bc570f4c1427ee65e6f7045e98a49 +Subproject 1fefab1f98590618d06e65295dc4dd69fbc7d8d @@ -277,6 +277,8 @@ you will need to set an appropriate development team in the project settings. <a name="build_and_run_integration"></a> ## Integrating Diligent Engine with Existing Build System +### Your Project Uses Cmake + If your project uses CMake, adding Diligent Engine requires just few lines of code. Suppose that the directory structure looks like this: @@ -322,7 +324,9 @@ Please also take a look at getting started tutorials for [Windows](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial00_HelloWin32) and [Linux](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial00_HelloLinux). -If your project does not use CMake, it is recommended to build libraries with cmake and add them to your build system. +### Your Project Does Not Use Cmake + +If your project doesn't use CMake, it is recommended to build libraries with CMake and add them to your build system. To install libraries and header files, run the following CMake command from the build folder: ```cmake @@ -331,8 +335,24 @@ cmake --build . --target install Global cmake installation directory is controlled by `CMAKE_INTALL_PREFIX` variable. Within that directory, `DILIGENT_CORE_INSTALL_DIR` defines the subdirectory where libraries and headers will be installed. +Note that on Windows by default CMake will be attempting to install to *Program Files* directory, which is likely +not what you want. Use `-D DILIGENT_CORE_INSTALL_DIR=install` to use local *install* folder instead. + +Diligent Core installation directory will contain everything required to integrate the engine: + +* *headers* subdirectory will contain all required header files. Add this directory to your include search directories. +* *lib* subdirectory will contain static libraries. +* *bin* subdirectory will contain dynamic libraries. + +When linking statically, you will need to list DiligentCore as well as all third-party libraries used +by the engine. Besides that you may also need to specify platform-specific system libraries. +In case of Windows the full list of libraries your project will need to link against may look like this: + +``` +DiligentCore.lib glslangd.lib HLSLd.lib OGLCompilerd.lib OSDependentd.lib SPIRVCross.lib SPIRVd.lib SPIRV-Tools.lib SPIRV-Tools-opt.lib glew-static.lib vulkan-1.lib dxgi.lib d3d11.lib d3d12.lib d3dcompiler.lib opengl32.lib +``` -Alternatively you can generate build files (such as Visual Studio projects) and add them to your project. +Another way is to generate build files (such as Visual Studio projects) and add them to your build system. Build customization described below can help tweak the settings for your specific needs. |
