|
|
|
@ -57,15 +57,15 @@ if (COMPILE_WIN32)
|
|
|
|
set(ENABLE_TCP_SSL OFF)
|
|
|
|
set(ENABLE_TCP_SSL OFF)
|
|
|
|
message(CHECK_START "Enable TCP SSL support - no; for simplicity WIN32 does not support TCP SSL.")
|
|
|
|
message(CHECK_START "Enable TCP SSL support - no; for simplicity WIN32 does not support TCP SSL.")
|
|
|
|
else()
|
|
|
|
else()
|
|
|
|
set(CMAKE_C_COMPILER /usr/bin/gcc)
|
|
|
|
set(CMAKE_C_COMPILER /usr/bin/gcc CACHE STRING "C compiler")
|
|
|
|
set(CMAKE_CXX_COMPILER /usr/bin/g++)
|
|
|
|
set(CMAKE_CXX_COMPILER /usr/bin/g++ CACHE STRING "C++ compiler")
|
|
|
|
set(ARCH amd64)
|
|
|
|
set(ARCH amd64)
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE amd64)
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE amd64)
|
|
|
|
endif (COMPILE_WIN32)
|
|
|
|
endif (COMPILE_WIN32)
|
|
|
|
|
|
|
|
|
|
|
|
if (CROSS_COMPILE_ARM)
|
|
|
|
if (CROSS_COMPILE_ARM)
|
|
|
|
set(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc)
|
|
|
|
set(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc CACHE STRING "C compiler")
|
|
|
|
set(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabihf-g++)
|
|
|
|
set(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabihf-g++ CACHE STRING "C++ compiler")
|
|
|
|
set(ARCH armhf)
|
|
|
|
set(ARCH armhf)
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR armhf)
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR armhf)
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE armhf)
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE armhf)
|
|
|
|
@ -73,8 +73,8 @@ if (CROSS_COMPILE_ARM)
|
|
|
|
message(CHECK_START "Cross compiling for 32-bit ARM - ${CMAKE_C_COMPILER}")
|
|
|
|
message(CHECK_START "Cross compiling for 32-bit ARM - ${CMAKE_C_COMPILER}")
|
|
|
|
endif (CROSS_COMPILE_ARM)
|
|
|
|
endif (CROSS_COMPILE_ARM)
|
|
|
|
if (CROSS_COMPILE_AARCH64)
|
|
|
|
if (CROSS_COMPILE_AARCH64)
|
|
|
|
set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc)
|
|
|
|
set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc CACHE STRING "C compiler")
|
|
|
|
set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++)
|
|
|
|
set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++ CACHE STRING "C++ compiler")
|
|
|
|
set(ARCH arm64)
|
|
|
|
set(ARCH arm64)
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR arm64)
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR arm64)
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE arm64)
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE arm64)
|
|
|
|
@ -97,16 +97,16 @@ if (CROSS_COMPILE_RPI_ARM)
|
|
|
|
GIT_REPOSITORY https://github.com/raspberrypi/tools.git
|
|
|
|
GIT_REPOSITORY https://github.com/raspberrypi/tools.git
|
|
|
|
)
|
|
|
|
)
|
|
|
|
FetchContent_MakeAvailable(RPiTools)
|
|
|
|
FetchContent_MakeAvailable(RPiTools)
|
|
|
|
set(CMAKE_C_COMPILER ${CMAKE_CURRENT_BINARY_DIR}/_deps/rpitools-src/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc)
|
|
|
|
set(CMAKE_C_COMPILER ${CMAKE_CURRENT_BINARY_DIR}/_deps/rpitools-src/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc CACHE STRING "C compiler" FORCE)
|
|
|
|
set(CMAKE_CXX_COMPILER ${CMAKE_CURRENT_BINARY_DIR}/_deps/rpitools-src/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++)
|
|
|
|
set(CMAKE_CXX_COMPILER ${CMAKE_CURRENT_BINARY_DIR}/_deps/rpitools-src/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ CACHE STRING "C++ compiler" FORCE)
|
|
|
|
|
|
|
|
|
|
|
|
message(CHECK_START "Apply OpenSSL library binaries for cross compling (old RPi) 32-bit ARM - ${CMAKE_CURRENT_BINARY_DIR}/_deps/rpitools-src")
|
|
|
|
message(CHECK_START "Apply OpenSSL library binaries for cross compling (old RPi) 32-bit ARM - ${CMAKE_CURRENT_BINARY_DIR}/_deps/rpitools-src")
|
|
|
|
execute_process(COMMAND tar xzf contrib/openssl_cross_patch.RPI_ARM.tar.gz -C ${CMAKE_CURRENT_BINARY_DIR}/_deps/rpitools-src WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
execute_process(COMMAND tar xzf contrib/openssl_cross_patch.RPI_ARM.tar.gz -C ${CMAKE_CURRENT_BINARY_DIR}/_deps/rpitools-src WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
|
|
|
|
|
|
|
|
set(OPENSSL_ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR}/_deps/rpitools-src/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/sysroot/usr/lib)
|
|
|
|
set(OPENSSL_ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR}/_deps/rpitools-src/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/sysroot/usr/lib)
|
|
|
|
else()
|
|
|
|
else()
|
|
|
|
set(CMAKE_C_COMPILER ${RPI_ARM_TOOLS}/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc)
|
|
|
|
set(CMAKE_C_COMPILER ${RPI_ARM_TOOLS}/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc CACHE STRING "C compiler" FORCE)
|
|
|
|
set(CMAKE_CXX_COMPILER ${RPI_ARM_TOOLS}/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++)
|
|
|
|
set(CMAKE_CXX_COMPILER ${RPI_ARM_TOOLS}/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ CACHE STRING "C++ compiler" FORCE)
|
|
|
|
|
|
|
|
|
|
|
|
message(CHECK_START "Apply OpenSSL library binaries for cross compling (old RPi) 32-bit ARM - ${RPI_ARM_TOOLS}")
|
|
|
|
message(CHECK_START "Apply OpenSSL library binaries for cross compling (old RPi) 32-bit ARM - ${RPI_ARM_TOOLS}")
|
|
|
|
execute_process(COMMAND tar xzf contrib/openssl_cross_patch.RPI_ARM.tar.gz -C ${RPI_ARM_TOOLS} WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
execute_process(COMMAND tar xzf contrib/openssl_cross_patch.RPI_ARM.tar.gz -C ${RPI_ARM_TOOLS} WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
|