summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2022-02-06 16:04:24 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2022-02-06 16:04:24 +0100
commit5d2c2b27a6323e2666378b986129b2a7c2c39e5c (patch)
treece8982b6c0111f79791068de2c2d4c6ce3138a49 /CMakeLists.txt
parentb623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff)
New upstream version 5.2.2GAupstream/5.2.2GA
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt31
1 files changed, 28 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0128295..a9b083e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,17 +23,38 @@ if(UNIX)
endif()
else()
set(XTRKCAD_USE_BROWSER_DEFAULT ON)
+ set(XTRKCAD_PACKAGE_GA_RELEASE_DEFAULT OFF)
endif(APPLE)
endif(UNIX)
+# Set Win64 flag
+IF(WIN32)
+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+ SET(WIN64 ON CACHE BOOL "Win x64")
+ IF (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ SET(CMAKE_INSTALL_PREFIX "C:/Program Files/XTrkCAD" CACHE PATH "WIN64 Install" FORCE)
+ ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ else (CMAKE_SIZEOF_VOID_P EQUAL 8)
+ SET(WIN64 OFF CACHE BOOL "Win x86")
+ endif (CMAKE_SIZEOF_VOID_P EQUAL 8)
+ENDIF(WIN32)
+
find_package(Libzip)
find_package(Zlib)
+find_package(MiniXML)
+
+if(MINIXML_FOUND)
+ set(XTRKCAD_CREATE_SVG 1)
+ message( STATUS "MiniXML found: SVG export is enabled")
+else(MINIXML_FOUND)
+ message( STATUS "MiniXML not found: no SVG export")
+endif(MINIXML_FOUND)
IF(WIN32)
SET(XTRKCAD_USE_GTK_DEFAULT OFF)
SET(XTRKCAD_USE_GETTEXT_DEFAULT ON)
- SET(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1" CACHE STRING "Flags used by the compiler during debug builds" FORCE)
+ SET(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /MT /Zi /Ob0 /Od /RTC1" CACHE STRING "Flags used by the compiler during debug builds" FORCE)
SET(CMAKE_C_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG" CACHE STRING "Flags used by the compiler during release minumum size builds" FORCE)
SET(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG" CACHE STRING "Flags used by the compiler during release builds" FORCE)
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG" CACHE STRING "Flags used by the compiler during release with debug info builds" FORCE)
@@ -56,6 +77,7 @@ OPTION(XTRKCAD_USE_GETTEXT "Use gettext for internationalization" ${XTRKCAD_USE_
OPTION(XTRKCAD_USE_DOXYGEN "Generate internals documentation using doxygen" ${XTRKCAD_USE_DOXYGEN_DEFAULT})
if(UNIX AND NOT APPLE)
option(XTRKCAD_USE_BROWSER "Show help in default browser" ${XTRKCAD_USE_BROWSER_DEFAULT})
+ option(XTRKCAD_PACKAGE_GA_RELEASE "Package for a Beta (OFF/Default) or GA (ON) release" ${XTRKCAD_PACKAGE_GA_RELEASE_DEFAULT})
endif()
if(APPLE)
@@ -106,12 +128,15 @@ find_package(Pandoc)
INCLUDE (CheckIncludeFiles)
CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H)
+if(HAVE_MALLOC_H)
+ add_definitions(-DHAVE_MALLOC_H)
+endif(HAVE_MALLOC_H)
# Setup some global options for installation ...
SET(XTRKCAD_MAJOR_VERSION "5")
SET(XTRKCAD_MINOR_VERSION "2")
-SET(XTRKCAD_RELEASE_VERSION "0")
-SET(XTRKCAD_VERSION_MODIFIER "Beta2.1")
+SET(XTRKCAD_RELEASE_VERSION "2")
+SET(XTRKCAD_VERSION_MODIFIER "GA")
SET(XTRKCAD_VERSION "${XTRKCAD_MAJOR_VERSION}.${XTRKCAD_MINOR_VERSION}.${XTRKCAD_RELEASE_VERSION}${XTRKCAD_VERSION_MODIFIER}")
IF(WIN32)