diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-02-06 16:04:57 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-02-06 16:04:57 +0100 |
commit | 59dccf358523dfc7679d1d8c120452a71e42243c (patch) | |
tree | f0f3cc006e8157d6bd699bd644b7dd7b35387ac2 /CMakeLists.txt | |
parent | fd6639655b399a79fb72f494786a4f57da9c90e7 (diff) | |
parent | d0ca838c7ab297036b4a7c45351761a48fe05efd (diff) |
Merge branch 'feature/upstrem' into develop
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 31 |
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) |