summaryrefslogtreecommitdiff
path: root/cmake/Modules/FindIrrlicht.cmake
diff options
context:
space:
mode:
authoradrido <robots_only_adrido@gmx.com>2019-06-10 03:56:55 +0200
committerrubenwardy <rw@rubenwardy.com>2019-06-10 02:56:55 +0100
commitbd6f1cca9dc357a6dbd54e86b3f575282daf6e1e (patch)
tree4f22d7ae58c5a1641fe1601d3e4e67b3c73ad51d /cmake/Modules/FindIrrlicht.cmake
parent9a07792f4d79ae5b386b781e6e73377f5758ee6a (diff)
downloadminetest-bd6f1cca9dc357a6dbd54e86b3f575282daf6e1e.tar.gz
minetest-bd6f1cca9dc357a6dbd54e86b3f575282daf6e1e.tar.bz2
minetest-bd6f1cca9dc357a6dbd54e86b3f575282daf6e1e.zip
Add compatibility to vcpkg buildsystem (#8317)
Diffstat (limited to 'cmake/Modules/FindIrrlicht.cmake')
-rw-r--r--cmake/Modules/FindIrrlicht.cmake22
1 files changed, 13 insertions, 9 deletions
diff --git a/cmake/Modules/FindIrrlicht.cmake b/cmake/Modules/FindIrrlicht.cmake
index 37349b892..6f361e829 100644
--- a/cmake/Modules/FindIrrlicht.cmake
+++ b/cmake/Modules/FindIrrlicht.cmake
@@ -43,6 +43,7 @@ else()
/usr/local/include/irrlicht
/usr/include/irrlicht
/system/develop/headers/irrlicht #Haiku
+ PATH_SUFFIXES "include/irrlicht"
)
find_library(IRRLICHT_LIBRARY NAMES libIrrlicht.so libIrrlicht.a Irrlicht
@@ -56,16 +57,19 @@ endif()
# On Windows, find the DLL for installation
if(WIN32)
- if(MSVC)
- set(IRRLICHT_COMPILER "VisualStudio")
- else()
- set(IRRLICHT_COMPILER "gcc")
+ # If VCPKG_APPLOCAL_DEPS is ON, dll's are automatically handled by VCPKG
+ if(NOT VCPKG_APPLOCAL_DEPS)
+ if(MSVC)
+ set(IRRLICHT_COMPILER "VisualStudio")
+ else()
+ set(IRRLICHT_COMPILER "gcc")
+ endif()
+ find_file(IRRLICHT_DLL NAMES Irrlicht.dll
+ PATHS
+ "${IRRLICHT_SOURCE_DIR}/bin/Win32-${IRRLICHT_COMPILER}"
+ DOC "Path of the Irrlicht dll (for installation)"
+ )
endif()
- find_file(IRRLICHT_DLL NAMES Irrlicht.dll
- PATHS
- "${IRRLICHT_SOURCE_DIR}/bin/Win32-${IRRLICHT_COMPILER}"
- DOC "Path of the Irrlicht dll (for installation)"
- )
endif(WIN32)
include(FindPackageHandleStandardArgs)