2013-11-28 13:56:32 +00:00
|
|
|
# Standard settings
|
|
|
|
set (CMAKE_SYSTEM_NAME QNX)
|
|
|
|
set (CMAKE_SYSTEM_VERSION 1)
|
2013-12-09 16:14:43 +00:00
|
|
|
set (CMAKE_PREFIX_PATH $ENV{QNX_TARGET}/usr)
|
|
|
|
set (CMAKE_INCLUDE_PATH $ENV{QNX_TARGET}/usr/include)
|
2013-11-28 13:56:32 +00:00
|
|
|
if (SIMULATOR)
|
|
|
|
set (CMAKE_SYSTEM_PROCESSOR x86)
|
2013-12-09 16:14:43 +00:00
|
|
|
set (CMAKE_LIBRARY_PATH $ENV{QNX_TARGET}/x86 $ENV{QNX_TARGET}/x86/usr)
|
2013-11-28 13:56:32 +00:00
|
|
|
else()
|
|
|
|
set (CMAKE_SYSTEM_PROCESSOR armv7)
|
2013-12-09 16:14:43 +00:00
|
|
|
set (CMAKE_LIBRARY_PATH $ENV{QNX_TARGET}/armle-v7 $ENV{QNX_TARGET}/armle-v7/usr)
|
2013-11-28 13:56:32 +00:00
|
|
|
endif()
|
|
|
|
set (UNIX True)
|
2014-06-11 13:02:56 +00:00
|
|
|
set (CMAKE_DL_LIBS)
|
2013-11-28 13:56:32 +00:00
|
|
|
|
2013-12-09 16:14:43 +00:00
|
|
|
set (CMAKE_FIND_ROOT_PATH ${CMAKE_PREFIX_PATH} ${CMAKE_LIBRARY_PATH} CACHE string "Blackberry find search path root")
|
|
|
|
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
|
|
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
|
|
|
2013-11-28 13:56:32 +00:00
|
|
|
include (CMakeForceCompiler)
|
2014-06-09 16:51:23 +00:00
|
|
|
CMAKE_FORCE_C_COMPILER (nto${CMAKE_SYSTEM_PROCESSOR}-gcc-4.8.2 nto${CMAKE_SYSTEM_PROCESSOR}-gcc-4.8.2)
|
|
|
|
CMAKE_FORCE_CXX_COMPILER (nto${CMAKE_SYSTEM_PROCESSOR}-g++-4.8.2 nto${CMAKE_SYSTEM_PROCESSOR}-g++-4.8.2)
|
2013-11-28 13:56:32 +00:00
|
|
|
set (CMAKE_COMPILER_IS_GNUCXX True)
|
|
|
|
execute_process( COMMAND nto${CMAKE_SYSTEM_PROCESSOR}-gcc --version
|
|
|
|
OUTPUT_VARIABLE GCC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE )
|
|
|
|
string( REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" GCC_VERSION "${GCC_VERSION}" )
|
|
|
|
set (CMAKE_C_COMPILER_VERSION ${GCC_VERSION})
|
|
|
|
set (CMAKE_CXX_COMPILER_VERSION ${GCC_VERSION})
|
|
|
|
|
|
|
|
# Skip the platform compiler checks for cross compiling
|
|
|
|
set (CMAKE_CROSSCOMPILING TRUE)
|
|
|
|
set (CMAKE_C_COMPILER_WORKS TRUE)
|
|
|
|
set (CMAKE_CXX_COMPILER_WORKS TRUE)
|
|
|
|
|
2014-06-11 13:02:56 +00:00
|
|
|
add_definitions(-D_QNX_SOURCE -D__STDC_CONSTANT_MACROS)
|