Commit 65689e2c authored by Tommy Olofsson's avatar Tommy Olofsson
Browse files

Changed how labcomm is located.

parent 474296af
......@@ -7,10 +7,12 @@
include(LibFindMacros)
if(NOT $ENV{LABCOMM_ROOT_DIR} STREQUAL "")
set(LABCOMM_ROOT_DIR $ENV{LABCOMM_ROOT_DIR} CACHE PATH "LabComm base directory location (optional, used for nonstandard installation paths)" FORCE)
else()
set(LABCOMM_ROOT_DIR "${Firefly_PROJECT_DIR}/../labcomm/lib/c/")
if(NOT LABCOMM_ROOT_DIR)
# No toolchain file used.
if("$ENV{LABCOMM}" STREQUAL "")
message(FATAL_ERROR "Set env. variable LABCOMM to labcomm root.")
endif()
set(LABCOMM_ROOT_DIR $ENV{LABCOMM}/lib/c)
endif()
# Header files to find
......@@ -28,4 +30,3 @@ set(LABCOMM_PROCESS_LIBS LABCOMM_LIBRARY)
set(LABCOMM_FIND_REQUIRED true)
libfind_process(LABCOMM)
......@@ -18,6 +18,11 @@ set(DRIVERLIB_DIR ${FT_SENSE_DIR}/lib/driverlib)
# according to CMake manual:
set(CMAKE_SYSTEM_NAME Generic)
if("$ENV{LABOMM_ARM}" STREQUAL "")
message(FATAL_ERROR "Set env. variable LABCOMM_ARM to labcomm root.")
endif()
set(LABCOMM_ROOT_DIR $ENV{LABCOMM_ARM}/lib/c)
# Specify the cross compiler:
set(CMAKE_C_COMPILER arm-none-eabi-gcc)
set(CROSS_COMPILER_ARM arm-none-eabi-gcc)
......
......@@ -4,6 +4,11 @@ set(CMAKE_SYSTEM_NAME Generic)
set(VXWORKS_COMPILING TRUE)
if("$ENV{LABCOMM_VX}" STREQUAL "")
message(FATAL_ERROR "Set env. variable LABCOMM_VX to labcomm root.")
endif()
set(LABCOMM_ROOT_DIR $ENV{LABCOMM_VX}/lib/c)
# Specify the cross compiler:
set(CMAKE_C_COMPILER i586-wrs-vxworks-gcc)
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DLABCOMM_COMPAT=\\\"labcomm_compat_vxworks.h\\\" -DLABCOMM_NO_STDIO")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment