mckaygerhard 8f690d2bbb set a new compilation set of rules, tune cmakefiles, tune buils
* tune up gitlab ci:
  * add winbuntu 14, add debian 7, winbuntu 17, build minetest for olders one
  * use minenux minetest repo game (seems not work)
  * remove non buildable stages.. remove windo shit
  * back cmake in list new behaviour for blacklist locales
  * gitlab ci build for debian 8 using backports on jsoncpp
  * solved https://github.com/minetest/minetest/issues/6567
  * solved https://github.com/minetest/minetest/issues/7681
* cmake fixed to minimum supported and c++11 standar able
  * Fix no locales being generated when APPLY_LOCALE_BLACKLIST=0
  * Fix linking with Postgres libs:
  * closes https://github.com/minetest/minetest/issues/12149
  * closes https://github.com/minetest/minetest/issues/11219
  * PostgreSQL fallback code missed the includes
  https://github.com/minetest/minetest/issues/11219
  * a24899bf2d
  * 3e2145d662
  * integrates https://github.com/minetest/minetest/pull/11215
  *  a24899bf2d
  * backported 998e4820c9
* use SSE registers for FP operations on i386 for modern gcc platforms only
  * only use if related are given, by example 32bit using gcc
    compilers/stdlibs becouse of the long time bugs around those
    errors by desing, its not about to crash the engine.. its about to
    permits to hacked clients (either players or the client program per se)
    making predictable results, so predictable results permits to catch
    securit issues!
  * floating point problems are only on modern gcc and modern platform
    arches, raising problems like bad calculations positions..
    a long time bug  reported at https://git.minetest.land/Mineclonia/Mineclonia/issues/201
    and addressed at https://github.com/minetest/minetest/issues/11742#issuecomment-994444462
    with enought explanations but not accepted byt stupid developers..
    now years later.. the problems were solved and reconiced as big bug!
    A workaround were proposed at https://github.com/minetest/minetest/pull/12389/files
    but never accepted (included in this repository), cos was superset by 8ff3fadba0
  * related minenux/minetest-engine-multicraft2#57
2023-09-14 20:29:46 -04:00

75 lines
1.8 KiB
CMake

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
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()
find_path(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h
PATHS
/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
PATHS
/usr/local/lib
/usr/lib
/system/develop/lib # Haiku
)
endif()
# On Windows, find the DLL for installation
if(WIN32)
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(WIN32)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Irrlicht DEFAULT_MSG IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR)