diff options
author | sfan5 <sfan5@live.de> | 2021-02-18 14:50:47 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2021-03-09 21:53:17 +0100 |
commit | 91c9313c87bfec8b44e5adb91b06aba9f343dd53 (patch) | |
tree | 297ff744452b3f9f27c6722a148099db71b0035d /cmake/Modules | |
parent | 3579dd21867598ff30867ebd68b690c85ba14f9b (diff) | |
download | minetest-91c9313c87bfec8b44e5adb91b06aba9f343dd53.tar.gz minetest-91c9313c87bfec8b44e5adb91b06aba9f343dd53.tar.bz2 minetest-91c9313c87bfec8b44e5adb91b06aba9f343dd53.zip |
Switch Irrlicht dependency to our own fork
-> https://github.com/minetest/irrlicht
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/FindIrrlicht.cmake | 51 |
1 files changed, 7 insertions, 44 deletions
diff --git a/cmake/Modules/FindIrrlicht.cmake b/cmake/Modules/FindIrrlicht.cmake index 6f361e829..8296de685 100644 --- a/cmake/Modules/FindIrrlicht.cmake +++ b/cmake/Modules/FindIrrlicht.cmake @@ -1,44 +1,11 @@ mark_as_advanced(IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR IRRLICHT_DLL) -set(IRRLICHT_SOURCE_DIR "" CACHE PATH "Path to irrlicht source directory (optional)") +# Find include directory and libraries -# Find include directory - -if(NOT IRRLICHT_SOURCE_DIR STREQUAL "") - set(IRRLICHT_SOURCE_DIR_INCLUDE - "${IRRLICHT_SOURCE_DIR}/include" - ) - - set(IRRLICHT_LIBRARY_NAMES libIrrlicht.a Irrlicht Irrlicht.lib) - - if(WIN32) - if(MSVC) - set(IRRLICHT_SOURCE_DIR_LIBS "${IRRLICHT_SOURCE_DIR}/lib/Win32-visualstudio") - set(IRRLICHT_LIBRARY_NAMES Irrlicht.lib) - else() - set(IRRLICHT_SOURCE_DIR_LIBS "${IRRLICHT_SOURCE_DIR}/lib/Win32-gcc") - set(IRRLICHT_LIBRARY_NAMES libIrrlicht.a libIrrlicht.dll.a) - endif() - else() - set(IRRLICHT_SOURCE_DIR_LIBS "${IRRLICHT_SOURCE_DIR}/lib/Linux") - set(IRRLICHT_LIBRARY_NAMES libIrrlicht.a) - endif() - - find_path(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h - PATHS - ${IRRLICHT_SOURCE_DIR_INCLUDE} - NO_DEFAULT_PATH - ) - - find_library(IRRLICHT_LIBRARY NAMES ${IRRLICHT_LIBRARY_NAMES} - PATHS - ${IRRLICHT_SOURCE_DIR_LIBS} - NO_DEFAULT_PATH - ) - -else() +if(TRUE) find_path(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h + DOC "Path to the directory with Irrlicht includes" PATHS /usr/local/include/irrlicht /usr/include/irrlicht @@ -46,7 +13,8 @@ else() PATH_SUFFIXES "include/irrlicht" ) - find_library(IRRLICHT_LIBRARY NAMES libIrrlicht.so libIrrlicht.a Irrlicht + find_library(IRRLICHT_LIBRARY NAMES libIrrlicht Irrlicht + DOC "Path to the Irrlicht library file" PATHS /usr/local/lib /usr/lib @@ -54,19 +22,14 @@ else() ) endif() +# Users will likely need to edit these +mark_as_advanced(CLEAR IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR) # On Windows, find the DLL for installation if(WIN32) # 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() |