summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-08 11:53:12 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-08 11:53:12 +0200
commite50482f994b6ebcce864a412111d376e99205cdb (patch)
treeff3192c6aaf213c4922521bed988e4ed4147f537 /CMakeLists.txt
parentd3897ce090dbeb220ed2c782f095597e417cf3cc (diff)
parentb623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff)
Update upstream source from tag 'upstream/5.2.0Beta2.1'
Update to upstream version '5.2.0Beta2.1' with Debian dir 1576f25f4c1496abfed44af31ead67d32c7be650
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt42
1 files changed, 29 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9d07364..0128295 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,7 @@
PROJECT(XTrkCAD)
enable_testing()
cmake_minimum_required(VERSION 2.8)
+set(CMAKE_MACOSX_RPATH 0)
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
@@ -11,20 +12,23 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
if(UNIX)
include(FindPkgConfig)
set(XTRKCAD_USE_GTK_DEFAULT ON)
- if(APPLE)
+ if(APPLE)
SET(XTRKCAD_USE_GETTEXT_DEFAULT OFF)
- else()
- set(XTRKCAD_USE_GETTEXT_DEFAULT ON)
- add_compile_options("-std=gnu99")
- PKG_CHECK_MODULES(GTK_WEBKIT "webkit-1.0")
+ SET(XTRKCAD_USE_APPLEHELP_DEFAULT ON)
+ PKG_CHECK_MODULES(GTK_WEBKIT "webkit-1.0" QUIET)
if(GTK_WEBKIT_FOUND)
set(XTRKCAD_USE_BROWSER_DEFAULT OFF)
else()
set(XTRKCAD_USE_BROWSER_DEFAULT ON)
endif()
- endif(APPLE)
+ else()
+ set(XTRKCAD_USE_BROWSER_DEFAULT ON)
+ endif(APPLE)
endif(UNIX)
+find_package(Libzip)
+find_package(Zlib)
+
IF(WIN32)
SET(XTRKCAD_USE_GTK_DEFAULT OFF)
SET(XTRKCAD_USE_GETTEXT_DEFAULT ON)
@@ -41,7 +45,7 @@ ENDIF(WIN32)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
if( POLICY CMP0026 )
- cmake_policy(SET CMP0026 OLD)
+ cmake_policy(SET CMP0026 NEW)
endif( POLICY CMP0026 )
endif(COMMAND cmake_policy)
@@ -54,6 +58,11 @@ if(UNIX AND NOT APPLE)
option(XTRKCAD_USE_BROWSER "Show help in default browser" ${XTRKCAD_USE_BROWSER_DEFAULT})
endif()
+if(APPLE)
+ option(XTRKCAD_USE_APPLEHELP "Show help in Apple Help" ${XTRKCAD_USE_APPLEHELP_DEFAULT})
+ option(XTRKCAD_USE_BROWSER "Show help in default browser" ${XTRKCAD_USE_BROWSER_DEFAULT})
+endif()
+
IF(UNIX)
PKG_CHECK_MODULES(GTK REQUIRED "gtk+-2.0")
ENDIF()
@@ -85,9 +94,9 @@ ENDIF(XTRKCAD_USE_PACKAGEMAKER)
# Find unit testing framework
find_package(CMocka)
if(CMOCKA_FOUND)
- include_directories(${CMOCKA_INCLUDE_DIR})
- set(LIBS ${LIBS} ${CMOCKA_LIBRARIES})
- option( XTRKCAD_TESTING "Build unittests" ON)
+ include_directories(${CMOCKA_INCLUDE_DIR})
+ set(LIBS ${LIBS} ${CMOCKA_LIBRARIES})
+ option( XTRKCAD_TESTING "Build unittests" ON)
endif()
# Find document conversion tool
@@ -100,9 +109,9 @@ CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H)
# Setup some global options for installation ...
SET(XTRKCAD_MAJOR_VERSION "5")
-SET(XTRKCAD_MINOR_VERSION "1")
-SET(XTRKCAD_RELEASE_VERSION "2")
-SET(XTRKCAD_VERSION_MODIFIER "a")
+SET(XTRKCAD_MINOR_VERSION "2")
+SET(XTRKCAD_RELEASE_VERSION "0")
+SET(XTRKCAD_VERSION_MODIFIER "Beta2.1")
SET(XTRKCAD_VERSION "${XTRKCAD_MAJOR_VERSION}.${XTRKCAD_MINOR_VERSION}.${XTRKCAD_RELEASE_VERSION}${XTRKCAD_VERSION_MODIFIER}")
IF(WIN32)
@@ -136,6 +145,13 @@ IF(XTRKCAD_USE_GETTEXT)
endif(INTL_PATH)
endif()
ENDIF(WIN32)
+ iF(APPLE)
+ find_path ( INTL_PATH libintl.h )
+ if(INTL_PATH)
+ message( STATUS "Use installed gettext module" )
+ INCLUDE_DIRECTORIES(${INTL_PATH})
+ endif(INTL_PATH)
+ ENDIF(APPLE)
ELSE(XTRKCAD_USE_GETTEXT)
SET(GENHELP_OPTS "-bh")
ENDIF(XTRKCAD_USE_GETTEXT)