summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-24 21:26:53 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-24 21:26:53 +0200
commitdf247efec654e512242e4f4f1b0212034f9e01fe (patch)
tree25c02e16957f3aa613af30c140fd8e8a3d52fda6 /CMakeLists.txt
parentd0b6a8a4ec298024f14f704f9e40a6f9d324ccf3 (diff)
parenta5ade52caa489cf0a713e0f02b764000d203140e (diff)
Merge branch 'release/debian/1%5.2.0Beta2.1-1' into masterdebian/1%5.2.0Beta2.1-1
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)