mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-26 08:01:51 +08:00
Merge pull request #164 from channgo2203/develop
Adding QNX cmake toolchains
This commit is contained in:
commit
09a958806a
8
easy_profiler_core/cmake/qnx-aarch64.cmake
Normal file
8
easy_profiler_core/cmake/qnx-aarch64.cmake
Normal file
@ -0,0 +1,8 @@
|
||||
# Processor specification, possible values: x86_64, armv7le, aarach64, ...
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
# Specify arch to be aarch64le
|
||||
set(arch gcc_ntoaarch64le)
|
||||
set(ARCH_NAME aarch64le)
|
||||
|
||||
# Command settings for QNX
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/qnx.cmake)
|
8
easy_profiler_core/cmake/qnx-armv7.cmake
Normal file
8
easy_profiler_core/cmake/qnx-armv7.cmake
Normal file
@ -0,0 +1,8 @@
|
||||
# Processor specification, possible values: x86_64, armv7le, aarach64, ...
|
||||
set(CMAKE_SYSTEM_PROCESSOR armv7)
|
||||
# Specify arch to be armv7le
|
||||
set(arch gcc_ntoarmv7le)
|
||||
set(ARCH_NAME armle-v7)
|
||||
|
||||
# Command settings for QNX
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/qnx.cmake)
|
8
easy_profiler_core/cmake/qnx-x86_64.cmake
Normal file
8
easy_profiler_core/cmake/qnx-x86_64.cmake
Normal file
@ -0,0 +1,8 @@
|
||||
# Processor specification, possible values: x86_64, armv7le, aarach64, ...
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
# Specify arch to be x86_64
|
||||
set(arch gcc_ntox86_64)
|
||||
set(ARCH_NAME x86_64)
|
||||
|
||||
# Command settings for QNX
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/qnx.cmake)
|
33
easy_profiler_core/cmake/qnx.cmake
Normal file
33
easy_profiler_core/cmake/qnx.cmake
Normal file
@ -0,0 +1,33 @@
|
||||
# Cross compilation for QNX
|
||||
set(CMAKE_SYSTEM_NAME QNX)
|
||||
set(QNX YES)
|
||||
|
||||
# Suppose you have already set QNX_HOST and QNX_TARGET Add compiler and linker
|
||||
# flags -std=gnu++14 is needed because QNX header files only cover GNU and POSIX
|
||||
set(CMAKE_CXX_FLAGS
|
||||
"${CMAKE_EXE_LINKER_FLAGS} -lang-c++ -V${arch} -std=gnu++14")
|
||||
|
||||
# Add definitions command for diffent platforms So we can use macro definition
|
||||
# "#ifdef PLATFORM_QNX" in source code
|
||||
set(PLATFORM_QNX ON)
|
||||
add_definitions(-DPLATFORM_QNX)
|
||||
# Build crossguid library for qnx
|
||||
set(GUID_LIBUUID ON)
|
||||
add_definitions(-DGUID_LIBUUID)
|
||||
|
||||
# Upstream settings
|
||||
set(CMAKE_C_COMPILER qcc)
|
||||
set(CMAKE_C_COMPILER_TARGET ${arch})
|
||||
set(CMAKE_CXX_COMPILER q++)
|
||||
set(CMAKE_CXX_COMPILER_TARGET ${arch})
|
||||
|
||||
# Set the path to the qnx host include and lib
|
||||
include_directories($ENV{QNX_HOST}/usr/include)
|
||||
link_directories($ENV{QNX_HOST}/usr/lib)
|
||||
|
||||
# Set the path to the qnx target include and lib
|
||||
include_directories($ENV{QNX_TARGET}/usr/include)
|
||||
link_directories($ENV{QNX_TARGET}/usr/lib)
|
||||
include_directories($ENV{QNX_TARGET}/${ARCH_NAME}/usr/include)
|
||||
link_directories($ENV{QNX_TARGET}/${ARCH_NAME}/lib)
|
||||
link_directories($ENV{QNX_TARGET}/${ARCH_NAME}/usr/lib)
|
Loading…
x
Reference in New Issue
Block a user