mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
better debian support
better mac osx support added qt frontend to debian packages
This commit is contained in:
parent
132ce9bb7f
commit
e63858fe9b
@ -19,39 +19,21 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
|
|||||||
|
|
||||||
include (SetPaths.cmake)
|
include (SetPaths.cmake)
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Set defaults for Universal Binaries. We want 32-bit Intel/PPC on 10.4
|
|
||||||
# and 32/64-bit Intel/PPC on >= 10.5. Anything <= 10.3 doesn't support.
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
# These are just defaults/recommendations, but how we want to build
|
IF(NOT ZINT_HAS_BEEN_RUN_BEFORE)
|
||||||
# out of the box. But the user needs to be able to change these options.
|
IF(EXISTS /Developer/SDKs/MacOSX10.5.sdk OR EXISTS /SDKs/MacOSX10.5.sdk)
|
||||||
# So we must only set the values the first time CMake is run, or we
|
SET(CMAKE_OSX_ARCHITECTURES "ppc;i386;ppc64;x86_64" CACHE STRING "Build architectures for OSX" FORCE)
|
||||||
# will overwrite any changes the user sets.
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
||||||
# FORCE is used because the options are not reflected in the UI otherwise.
|
ELSE(EXISTS /Developer/SDKs/MacOSX10.5.sdk OR EXISTS /SDKs/MacOSX10.5.sdk)
|
||||||
IF(NOT "${OPENTHREADS_CONFIG_HAS_BEEN_RUN_BEFORE}")
|
IF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk OR EXISTS /SDKs/MacOSX10.4u.sdk)
|
||||||
# This is really fragile, but CMake doesn't provide the OS system
|
|
||||||
# version information we need. (Darwin versions can be changed
|
|
||||||
# independently of OS X versions.)
|
|
||||||
# It does look like CMake handles the CMAKE_OSX_SYSROOT automatically.
|
|
||||||
IF(EXISTS /Developer/SDKs/10.5.sdk)
|
|
||||||
#Qt does not support ppc64 and x86_64
|
|
||||||
# SET(CMAKE_OSX_ARCHITECTURES "ppc;i386;ppc64;x86_64" CACHE STRING "Build architectures for OSX" FORCE)
|
|
||||||
SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE)
|
SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE)
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
||||||
ELSE(EXISTS /Developer/SDKs/10.5.sdk)
|
ENDIF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk OR EXISTS /SDKs/MacOSX10.4u.sdk)
|
||||||
IF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
|
ENDIF(EXISTS /Developer/SDKs/MacOSX10.5.sdk OR EXISTS /SDKs/MacOSX10.5.sdk)
|
||||||
#Qt does not support ppc64 and x86_64
|
message("Build architectures for OSX:${CMAKE_OSX_ARCHITECTURES}")
|
||||||
# SET(CMAKE_OSX_ARCHITECTURES "ppc;i386;ppc64;x86_64" CACHE STRING "Build architectures for OSX" FORCE)
|
ENDIF(NOT ZINT_HAS_BEEN_RUN_BEFORE)
|
||||||
SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE)
|
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
|
||||||
ELSE(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
|
|
||||||
# No Universal Binary support
|
|
||||||
ENDIF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
|
|
||||||
ENDIF(EXISTS /Developer/SDKs/10.5.sdk)
|
|
||||||
ENDIF(NOT "${OPENTHREADS_CONFIG_HAS_BEEN_RUN_BEFORE}")
|
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
|
|
||||||
|
|
||||||
add_subdirectory(backend)
|
add_subdirectory(backend)
|
||||||
add_subdirectory(frontend)
|
add_subdirectory(frontend)
|
||||||
|
|
||||||
@ -77,3 +59,11 @@ ADD_CUSTOM_TARGET(uninstall
|
|||||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||||
|
|
||||||
install(FILES cmake/modules/FindZint.cmake DESTINATION ${CMAKE_ROOT}/Modules COMPONENT Devel)
|
install(FILES cmake/modules/FindZint.cmake DESTINATION ${CMAKE_ROOT}/Modules COMPONENT Devel)
|
||||||
|
|
||||||
|
# This needs to be run very last so other parts of the scripts can take
|
||||||
|
# advantage of this.
|
||||||
|
IF(NOT ZINT_HAS_BEEN_RUN_BEFORE)
|
||||||
|
SET(ZINT_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether this is the first time running CMake or if CMake has been configured before")
|
||||||
|
ENDIF(NOT ZINT_HAS_BEEN_RUN_BEFORE)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user