Skip to content

prepare for universal build and CMake 4 #168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: next_release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
# Consult LICENSE.txt for licensing information.
#-----------------------------------------------------------------------------------------------------------------------

if(CMAKE_MAJOR_VERSION VERSION_EQUAL "4")
cmake_minimum_required(VERSION 3.10)
else()
# for android builds
cmake_minimum_required(VERSION 3.4)
endif()
cmake_minimum_required(VERSION 3.10)

project(PDFNetLanguageBindings CXX)

Expand Down
3 changes: 2 additions & 1 deletion PDFNetPHP/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
#-----------------------------------------------------------------------------------------------------------------------

project(PDFNetPHP CXX)
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.10)


find_program(PHP_CONFIG_EXECUTABLE NAMES php-config7 php-config5 php-config4 php-config)
if (NOT PHP_CONFIG_EXECUTABLE)
Expand Down
11 changes: 3 additions & 8 deletions PDFNetRuby/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
# Consult LICENSE.txt for licensing information.
#-----------------------------------------------------------------------------------------------------------------------

cmake_minimum_required(VERSION 3.10)

project(PDFNetRuby CXX)
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)

# Checks the header and library directory of the current active ruby install
# This will respond to virtual enviroments
Expand Down Expand Up @@ -72,13 +73,7 @@ elseif (UNIX)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fPIC")
if (APPLE)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-headerpad_max_install_names -lSystem -undefined dynamic_lookup -Wl,-install_name,@rpath/PDFNetRuby.bundle -Wl,-rpath,/usr/lib -Wl,-rpath,/usr/local/lib -Wl,-rpath,.")
if(BUILD_MACOS_ARM64)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -target arm64-apple-macos11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -target arm64-apple-macos11")
set(CMAKE_OSX_SYSROOT "/Applications/Xcode_12.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk")
else(BUILD_MACOS_ARM64)
set(CMAKE_OSX_SYSROOT "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk")
endif(BUILD_MACOS_ARM64)
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
else ()
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-rpath,'$ORIGIN'")
endif ()
Expand Down
2 changes: 1 addition & 1 deletion PDFTronGo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#-----------------------------------------------------------------------------------------------------------------------

project(PDFTronGo CXX)
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.10)

find_program(GO_EXECUTABLE go PATHS $ENV{HOME}/go ENV GOROOT GOPATH PATH_SUFFIXES bin)
if(GO_EXECUTABLE)
Expand Down