From 5d2c2b27a6323e2666378b986129b2a7c2c39e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 6 Feb 2022 16:04:24 +0100 Subject: New upstream version 5.2.2GA --- CMake/FindFreeImage.cmake | 24 ++++++++++-- CMake/FindLibzip.cmake | 60 ++++++++++++++++++++--------- CMake/FindMiniXML.cmake | 97 +++++++++++++++++++++++++++++++++++++++++++++++ CMake/FindZlib.cmake | 43 ++++++++++++++------- 4 files changed, 191 insertions(+), 33 deletions(-) create mode 100644 CMake/FindMiniXML.cmake (limited to 'CMake') diff --git a/CMake/FindFreeImage.cmake b/CMake/FindFreeImage.cmake index 6073916..b24f98d 100644 --- a/CMake/FindFreeImage.cmake +++ b/CMake/FindFreeImage.cmake @@ -12,20 +12,38 @@ # if (WIN32) + # Folders for x86/x64 + if (WIN64) find_path( FREEIMAGE_INCLUDE_PATH FreeImage.h PATHS - $ENV{XTCEXTERNALROOT}/x86/FreeImage + $ENV{XTCEXTERNALROOT}/x64/FreeImage DOC "The directory where FreeImage.h resides") find_library( FREEIMAGE_LIBRARY NAMES FreeImage freeimage PATHS - $ENV{XTCEXTERNALROOT}/x86/FreeImage + $ENV{XTCEXTERNALROOT}/x64/FreeImage DOC "The FreeImage library") find_file( FREEIMAGE_SHAREDLIB NAMES freeimage.DLL PATHS - $ENV{XTCEXTERNALROOT}/x86/FreeImage + $ENV{XTCEXTERNALROOT}/x64/FreeImage ) + else (WIN64) + find_path( FREEIMAGE_INCLUDE_PATH FreeImage.h + PATHS + $ENV{XTCEXTERNALROOT}/x86/FreeImage + DOC "The directory where FreeImage.h resides") + find_library( FREEIMAGE_LIBRARY + NAMES FreeImage freeimage + PATHS + $ENV{XTCEXTERNALROOT}/x86/FreeImage + DOC "The FreeImage library") + find_file( FREEIMAGE_SHAREDLIB + NAMES freeimage.DLL + PATHS + $ENV{XTCEXTERNALROOT}/x86/FreeImage + ) + endif (WIN64) else (WIN32) find_path( FREEIMAGE_INCLUDE_PATH FreeImage.h /usr/include diff --git a/CMake/FindLibzip.cmake b/CMake/FindLibzip.cmake index b6f1a9e..004a88d 100644 --- a/CMake/FindLibzip.cmake +++ b/CMake/FindLibzip.cmake @@ -10,23 +10,44 @@ # if(WIN32) - find_path( LIBZIP_INCLUDE_DIR_ZIP zip.h - PATHS - $ENV{XTCEXTERNALROOT}/x86/libzip - DOC "The directory where zip.h resides") - find_path( LIBZIP_INCLUDE_DIR_ZIPCONF zipconf.h - PATHS - $ENV{XTCEXTERNALROOT}/x86/libzip - DOC "The directory where zip.h resides") - find_library( LIBZIP_LIBRARY - NAMES zip Zip - PATHS - $ENV{XTCEXTERNALROOT}/x86/libzip - DOC "The libzip library") - find_file( LIBZIP_SHAREDLIB - NAMES zip.dll Zip.dll - PATHS - $ENV{XTCEXTERNALROOT}/x86/libzip) + # Folders for x86/x64 + if (WIN64) + find_path( LIBZIP_INCLUDE_DIR_ZIP zip.h + PATHS + $ENV{XTCEXTERNALROOT}/x64/libzip + DOC "The directory where zip.h resides") + find_path( LIBZIP_INCLUDE_DIR_ZIPCONF zipconf.h + PATHS + $ENV{XTCEXTERNALROOT}/x64/libzip + DOC "The directory where zip.h resides") + find_library( LIBZIP_LIBRARY + NAMES zip Zip + PATHS + $ENV{XTCEXTERNALROOT}/x64/libzip + DOC "The libzip library") + find_file( LIBZIP_SHAREDLIB + NAMES zip.dll Zip.dll + PATHS + $ENV{XTCEXTERNALROOT}/x64/libzip) + else (WIN64) + find_path( LIBZIP_INCLUDE_DIR_ZIP zip.h + PATHS + $ENV{XTCEXTERNALROOT}/x86/libzip + DOC "The directory where zip.h resides") + find_path( LIBZIP_INCLUDE_DIR_ZIPCONF zipconf.h + PATHS + $ENV{XTCEXTERNALROOT}/x86/libzip + DOC "The directory where zip.h resides") + find_library( LIBZIP_LIBRARY + NAMES zip Zip + PATHS + $ENV{XTCEXTERNALROOT}/x86/libzip + DOC "The libzip library") + find_file( LIBZIP_SHAREDLIB + NAMES zip.dll Zip.dll + PATHS + $ENV{XTCEXTERNALROOT}/x86/libzip) + endif (WIN64) else(WIN32) find_package(PkgConfig) pkg_check_modules(PC_LIBZIP QUIET libzip) @@ -39,8 +60,13 @@ else(WIN32) NAMES zipconf.h HINTS ${PC_LIBZIP_INCLUDE_DIRS}) +if(UNIX AND NOT APPLE) + find_library(LIBZIP_LIBRARY + NAMES libzip.a zip) +else(UNIX AND NOT APPLE) find_library(LIBZIP_LIBRARY NAMES zip) +endif(UNIX AND NOT APPLE) endif(WIN32) include(FindPackageHandleStandardArgs) diff --git a/CMake/FindMiniXML.cmake b/CMake/FindMiniXML.cmake new file mode 100644 index 0000000..927430d --- /dev/null +++ b/CMake/FindMiniXML.cmake @@ -0,0 +1,97 @@ +# +# Try to find the mini-xml library and include path. +# Once done this will define +# +# MINIXML_FOUND +# MINIXML_INCLUDE_PATH +# MINIXML_LIBRARY +# MINIXML_SHAREDLIB (Win32 only) +# +# There is no default installation for mini-xml on Windows so a +# XTrackCAD specific directory tree is assumed +# + +if (WIN32) + # Folders for x86/x64 + if (WIN64) + find_path( MINIXML_INCLUDE_PATH mxml.h + PATHS + $ENV{XTCEXTERNALROOT}/x64/mxml + DOC "The directory where mxml.h resides") + find_library( MINIXML_LIBRARY + NAMES mxml1 + PATHS + $ENV{XTCEXTERNALROOT}/x64/mxml + DOC "The Mini XML shared library") + find_file( MINIXML_SHAREDLIB + NAMES mxml1.DLL + PATHS + $ENV{XTCEXTERNALROOT}/x64/mxml + DOC "The Mini XML DLL" ) + find_library( MINIXML_STATIC_LIBRARY + NAMES mxmlstat.lib + PATHS + $ENV{XTCEXTERNALROOT}/x64/mxml + DOC "The Mini XML static library") + else (WIN64) + find_path( MINIXML_INCLUDE_PATH mxml.h + PATHS + $ENV{XTCEXTERNALROOT}/x86/mxml + DOC "The directory where mxml.h resides") + find_library( MINIXML_LIBRARY + NAMES mxml1 + PATHS + $ENV{XTCEXTERNALROOT}/x86/mxml + DOC "The Mini XML shared library") + find_file( MINIXML_SHAREDLIB + NAMES mxml1.DLL + PATHS + $ENV{XTCEXTERNALROOT}/x86/mxml + DOC "The Mini XML DLL" ) + find_library( MINIXML_STATIC_LIBRARY + NAMES mxmlstat.lib + PATHS + $ENV{XTCEXTERNALROOT}/x86/mxml + DOC "The Mini XML static library") + endif (WIN64) +else (WIN32) + find_path( MINIXML_INCLUDE_PATH mxml.h + /usr/include + /usr/local/include + /sw/include + /opt/local/include + DOC "The directory where mxml.h resides") + find_library( MINIXML_LIBRARY + NAMES mxml1 mxml + PATHS + /usr/lib64 + /usr/lib + /usr/local/lib64 + /usr/local/lib + /sw/lib + /opt/local/lib + DOC "The Mini XML library") + find_library( MINIXML_STATIC_LIBRARY + NAMES libmxml.a + PATHS + /usr/lib64 + /usr/lib + /usr/local/lib64 + /usr/local/lib + /sw/lib + /opt/local/lib + DOC "The Mini XML static library") +endif (WIN32) + +find_package_handle_standard_args( MiniXML + DEFAULT_MSG + MINIXML_LIBRARY + MINIXML_INCLUDE_PATH +) + +mark_as_advanced( + MINIXML_FOUND + MINIXML_LIBRARY + MINIXML_SHAREDLIB + MINIXML_STATIC_LIBRARY +MINIXML_INCLUDE_PATH) diff --git a/CMake/FindZlib.cmake b/CMake/FindZlib.cmake index 3305ee3..3ad5b6c 100644 --- a/CMake/FindZlib.cmake +++ b/CMake/FindZlib.cmake @@ -10,19 +10,36 @@ # if(WIN32) - find_path( ZLIB_INCLUDE_DIR zlib.h - PATHS - $ENV{XTCEXTERNALROOT}/x86/zlib - DOC "The directory where zip.h resides") - find_library( ZLIB_LIBRARY - NAMES zlib Zlib - PATHS - $ENV{XTCEXTERNALROOT}/x86/zlib - DOC "The zlib library") - find_file( ZLIB_SHAREDLIB - NAMES zlib.dll Zlib.dll - PATHS - $ENV{XTCEXTERNALROOT}/x86/zlib) + # Folders for x86/x64 + if (WIN64) + find_path( ZLIB_INCLUDE_DIR zlib.h + PATHS + $ENV{XTCEXTERNALROOT}/x64/zlib + DOC "The directory where zlib.h resides") + find_library( ZLIB_LIBRARY + NAMES zlib Zlib + PATHS + $ENV{XTCEXTERNALROOT}/x64/zlib + DOC "The zlib library") + find_file( ZLIB_SHAREDLIB + NAMES zlib.dll Zlib.dll + PATHS + $ENV{XTCEXTERNALROOT}/x64/zlib) + else (WIN64) + find_path( ZLIB_INCLUDE_DIR zlib.h + PATHS + $ENV{XTCEXTERNALROOT}/x86/zlib + DOC "The directory where zlib.h resides") + find_library( ZLIB_LIBRARY + NAMES zlib Zlib + PATHS + $ENV{XTCEXTERNALROOT}/x86/zlib + DOC "The zlib library") + find_file( ZLIB_SHAREDLIB + NAMES zlib.dll Zlib.dll + PATHS + $ENV{XTCEXTERNALROOT}/x86/zlib) + endif (WIN64) else(WIN32) find_package(PkgConfig) pkg_check_modules(PC_ZLIB QUIET zlib) -- cgit v1.2.3