From db0900556d82c646b33340811fb9eb2ad15d5d83 Mon Sep 17 00:00:00 2001 From: Gerardo Tauriello <gerardo.tauriello@unibas.ch> Date: Mon, 2 Dec 2019 16:02:34 +0100 Subject: [PATCH] Fix env. var. naming for cmake instructions. As weird as it sounds but the proper var. to set is PNG_PNG_INCLUDE_DIR instead of PNG_INCLUDE_DIR. The latter is overwritten by FindPNG and actually obsolete (see https://github.com/Kitware/CMake/blob/master/Modules/FindPNG.cmake). --- modules/doc/install.rst | 2 +- modules/gfx/src/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/doc/install.rst b/modules/doc/install.rst index b86672515..cfea868bf 100644 --- a/modules/doc/install.rst +++ b/modules/doc/install.rst @@ -205,7 +205,7 @@ can influence it. files directly) * `PNG_LIBRARY` defines the location of the libpng library (file name starting with `libpng`) - * `PNG_INCLUDE_DIR` defines the include folder of libpng (contains include + * `PNG_PNG_INCLUDE_DIR` defines the include folder of libpng (contains include files directly) * `ZLIB_LIBRARY` defines the location of the zlib library (file name starting with `libz`) diff --git a/modules/gfx/src/CMakeLists.txt b/modules/gfx/src/CMakeLists.txt index acd3f9eb4..d7790789e 100644 --- a/modules/gfx/src/CMakeLists.txt +++ b/modules/gfx/src/CMakeLists.txt @@ -210,7 +210,7 @@ module(NAME gfx SOURCES ${OST_GFX_SOURCES} ${OST_GFX_MAP_SOURCES} ${OST_GFX_HEADERS} ${OST_GFX_MAP_HEADERS} DEPENDS_ON ${OST_GFX_DEPENDENCIES}) -include_directories(${PNG_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) +include_directories(${PNG_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR}) # link against OpenGL and PNG libraries target_link_libraries(ost_gfx ${OPENGL_LIBRARIES} ${PNG_LIBRARIES}) -- GitLab