diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-02-06 16:04:24 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-02-06 16:04:24 +0100 |
commit | 5d2c2b27a6323e2666378b986129b2a7c2c39e5c (patch) | |
tree | ce8982b6c0111f79791068de2c2d4c6ce3138a49 /CMake | |
parent | b623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff) |
New upstream version 5.2.2GAupstream/5.2.2GA
Diffstat (limited to 'CMake')
-rw-r--r-- | CMake/FindFreeImage.cmake | 24 | ||||
-rw-r--r-- | CMake/FindLibzip.cmake | 60 | ||||
-rw-r--r-- | CMake/FindMiniXML.cmake | 97 | ||||
-rw-r--r-- | CMake/FindZlib.cmake | 43 |
4 files changed, 191 insertions, 33 deletions
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)
|