diff options
author | Nick Foster <nick@ettus.com> | 2011-05-23 18:49:08 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-06-14 17:27:46 -0700 |
commit | 29735b8e67138147ca5327b098274fa2bd2a44ca (patch) | |
tree | 7aad1ddd9797c03473c51fc7b4cb30a7f329123b /host/lib/convert/CMakeLists.txt | |
parent | 86f12cd1c1c606bbfbc6f0ddbd98166fe9251a13 (diff) | |
download | uhd-29735b8e67138147ca5327b098274fa2bd2a44ca.tar.gz uhd-29735b8e67138147ca5327b098274fa2bd2a44ca.tar.bz2 uhd-29735b8e67138147ca5327b098274fa2bd2a44ca.zip |
UHD: Orc implementation added and CMake magic put in. Won't link.
Diffstat (limited to 'host/lib/convert/CMakeLists.txt')
-rw-r--r-- | host/lib/convert/CMakeLists.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/host/lib/convert/CMakeLists.txt b/host/lib/convert/CMakeLists.txt index d189aa687..5b05bb72a 100644 --- a/host/lib/convert/CMakeLists.txt +++ b/host/lib/convert/CMakeLists.txt @@ -55,6 +55,37 @@ IF(HAVE_ARM_NEON_H) ENDIF(HAVE_ARM_NEON_H) ######################################################################## +# Look for Orc support +######################################################################## +FIND_PACKAGE(PkgConfig) +IF(PKG_CONFIG_FOUND) +PKG_CHECK_MODULES(ORC "orc-0.4") +ENDIF(PKG_CONFIG_FOUND) + +FIND_PROGRAM(ORCC_EXECUTABLE orcc) + +IF(ORC_FOUND AND ORCC_EXECUTABLE) + INCLUDE_DIRECTORIES(${ORC_INCLUDE_DIRS}) + LINK_DIRECTORIES(${ORC_LIBRARY_DIRS}) + + SET(orcc_src ${CMAKE_CURRENT_SOURCE_DIR}/convert_orc.orc) + + GET_FILENAME_COMPONENT(orc_file_name_we ${orcc_src} NAME_WE) + SET(orcc_gen ${CMAKE_CURRENT_BINARY_DIR}/${orc_file_name_we}.c) + MESSAGE(STATUS "orcc_gen is ${orcc_gen}, orcc_src is ${orcc_src}") + ADD_CUSTOM_COMMAND( + COMMAND ${ORCC_EXECUTABLE} --implementation -o ${orcc_gen} ${orcc_src} + DEPENDS ${orcc_src} OUTPUT ${orcc_gen} + ) + LIBUHD_APPEND_SOURCES(${orcc_gen}) + LIBUHD_APPEND_SOURCES( + ${CMAKE_CURRENT_SOURCE_DIR}/convert_with_orc.cpp + ) +ELSE() + MESSAGE(STATUS "Orc not found, disabling orc support...") +ENDIF(ORC_FOUND AND ORCC_EXECUTABLE) + +######################################################################## # Convert types generation ######################################################################## INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) |