diff options
Diffstat (limited to 'host/cmake')
-rw-r--r-- | host/cmake/Modules/FindORC.cmake | 36 | ||||
-rw-r--r-- | host/cmake/Modules/UHDPackage.cmake | 6 | ||||
-rw-r--r-- | host/cmake/Modules/UHDPython.cmake | 2 | ||||
-rw-r--r-- | host/cmake/Modules/UHDVersion.cmake | 12 | ||||
-rw-r--r-- | host/cmake/Toolchains/mingw_cross.cmake | 65 | ||||
-rw-r--r-- | host/cmake/Toolchains/oe-sdk_cross.cmake | 2 |
6 files changed, 75 insertions, 48 deletions
diff --git a/host/cmake/Modules/FindORC.cmake b/host/cmake/Modules/FindORC.cmake deleted file mode 100644 index e13eae235..000000000 --- a/host/cmake/Modules/FindORC.cmake +++ /dev/null @@ -1,36 +0,0 @@ -######################################################################## -# Find the library for ORC development files -######################################################################## - -INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES(PC_ORC "orc-0.4") -PKG_CHECK_MODULES(PC_ORC_V4_11 "orc-0.4 > 0.4.11") - -#we are using the pkg config as a version check -#if we have pkg config, the right version must be found -#the alternative is that no pkg config orc is found -if (PC_ORC_V4_11_FOUND OR NOT PC_ORC_FOUND) - -FIND_PATH( - ORC_INCLUDE_DIRS - NAMES orc/orc.h - HINTS $ENV{ORC_DIR}/include/orc-0.4 - ${PC_ORC_INCLUDEDIR} - PATHS /usr/local/include/orc-0.4 - /usr/include/orc-0.4 -) - -FIND_LIBRARY( - ORC_LIBRARIES - NAMES orc-0.4 - HINTS $ENV{ORC_DIR}/lib - ${PC_ORC_LIBDIR} - PATHS /usr/local/lib - /usr/lib -) - -endif() #both PC ORC FOUND - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(ORC DEFAULT_MSG ORC_LIBRARIES ORC_INCLUDE_DIRS) -MARK_AS_ADVANCED(ORC_LIBRARIES ORC_INCLUDE_DIRS) diff --git a/host/cmake/Modules/UHDPackage.cmake b/host/cmake/Modules/UHDPackage.cmake index 298b9d33a..a17af9c61 100644 --- a/host/cmake/Modules/UHDPackage.cmake +++ b/host/cmake/Modules/UHDPackage.cmake @@ -210,10 +210,10 @@ SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " DeleteRegValue HKLM ${HLKM_ENV} \\\"UHD_PKG_PATH\\\" ") -IF(MSVC) - #Install necessary MSVC runtime DLL's +IF(WIN32) + #Install necessary runtime DLL's INCLUDE(InstallRequiredSystemLibraries) -ENDIF(MSVC) +ENDIF(WIN32) ######################################################################## IF(NOT ${CPACK_GENERATOR} STREQUAL NSIS) diff --git a/host/cmake/Modules/UHDPython.cmake b/host/cmake/Modules/UHDPython.cmake index fdcdccb4b..a3da150a1 100644 --- a/host/cmake/Modules/UHDPython.cmake +++ b/host/cmake/Modules/UHDPython.cmake @@ -51,7 +51,7 @@ MESSAGE(STATUS "Python interpreter: ${PYTHON_EXECUTABLE}") MESSAGE(STATUS "Override with: -DPYTHON_EXECUTABLE=<path-to-python>") IF(NOT PYTHONINTERP_FOUND) - MESSAGE(FATAL_ERROR "Error: Python interpretor required by the build system.") + MESSAGE(FATAL_ERROR "Error: Python interpreter required by the build system.") ENDIF(NOT PYTHONINTERP_FOUND) MACRO(PYTHON_CHECK_MODULE desc mod cmd have) diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake index 66b4402ed..b8b256834 100644 --- a/host/cmake/Modules/UHDVersion.cmake +++ b/host/cmake/Modules/UHDVersion.cmake @@ -27,9 +27,9 @@ FIND_PACKAGE(Git QUIET) # - set UHD_VERSION_DEVEL to true for master and development branches ######################################################################## SET(UHD_VERSION_MAJOR 003) -SET(UHD_VERSION_MINOR 008) -SET(UHD_VERSION_PATCH 005) -SET(UHD_VERSION_DEVEL FALSE) +SET(UHD_VERSION_MINOR 009) +SET(UHD_VERSION_PATCH git) +SET(UHD_VERSION_DEVEL TRUE) ######################################################################## # Set up trimmed version numbers for DLL resource files and packages @@ -38,7 +38,7 @@ SET(UHD_VERSION_DEVEL FALSE) FUNCTION(DEPAD_NUM input_num output_num) EXECUTE_PROCESS( WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${PYTHON_EXECUTABLE} -c "print int('${input_num}')" + COMMAND ${PYTHON_EXECUTABLE} -c "print(int('${input_num}'))" OUTPUT_VARIABLE depadded_num OUTPUT_STRIP_TRAILING_WHITESPACE ) SET(${output_num} ${depadded_num} PARENT_SCOPE) @@ -69,12 +69,12 @@ EXECUTE_PROCESS( IF(_git_describe_result EQUAL 0) EXECUTE_PROCESS( WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMAND ${PYTHON_EXECUTABLE} -c "print '${_git_describe}'.split('-')[-2]" + COMMAND ${PYTHON_EXECUTABLE} -c "print('${_git_describe}'.split('-')[-2])" OUTPUT_VARIABLE UHD_GIT_COUNT OUTPUT_STRIP_TRAILING_WHITESPACE ) EXECUTE_PROCESS( WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMAND ${PYTHON_EXECUTABLE} -c "print '${_git_describe}'.split('-')[-1]" + COMMAND ${PYTHON_EXECUTABLE} -c "print('${_git_describe}'.split('-')[-1])" OUTPUT_VARIABLE UHD_GIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE ) ENDIF() diff --git a/host/cmake/Toolchains/mingw_cross.cmake b/host/cmake/Toolchains/mingw_cross.cmake new file mode 100644 index 000000000..f1406ec46 --- /dev/null +++ b/host/cmake/Toolchains/mingw_cross.cmake @@ -0,0 +1,65 @@ +# +# Allow the user to specify a MinGW prefix, but fill in +# most likely default if none given. +# + +SET(CMAKE_SYSTEM_NAME Windows) + +IF(NOT DEFINED MINGW_PREFIX) + SET(POSSIBLE_PREFIXES + i586-mingw32msvc + i686-pc-mingw32 + x86_64-pc-mingw32 + i686-w64-mingw32 + x86_64-w64-mingw32 + ) + + SET(MINGW_FOUND 0) + FOREACH(prefix ${POSSIBLE_PREFIXES}) + IF(EXISTS /usr/${prefix}) + SET(MINGW_PREFIX ${prefix}) + SET(MINGW_FOUND 1) + BREAK() + ENDIF(EXISTS /usr/${prefix}) + ENDFOREACH(prefix ${POSSIBLE_PREFIXES}) + + IF(NOT MINGW_FOUND) + MESSAGE(FATAL_ERROR "No MinGW type specified, but none detected in the usual locations.") + ENDIF(NOT MINGW_FOUND) +ENDIF(NOT DEFINED MINGW_PREFIX) + +SET(MINGW_PREFIX ${MINGW_PREFIX} CACHE STRING "MinGW prefix") + +SET(CMAKE_C_COMPILER ${MINGW_PREFIX}-gcc) +SET(CMAKE_CXX_COMPILER ${MINGW_PREFIX}-g++) +SET(CMAKE_RC_COMPILER ${MINGW_PREFIX}-windres) + +IF(NOT DEFINED CMAKE_FIND_ROOT_PATH) + SET(CMAKE_FIND_ROOT_PATH /usr/${MINGW_PREFIX}) +ENDIF(NOT DEFINED CMAKE_FIND_ROOT_PATH) + +SET(CMAKE_INCLUDE_PATH + ${CMAKE_FIND_ROOT_PATH}/local/include + ${CMAKE_FIND_ROOT_PATH}/include +) + +SET(CMAKE_LIBRARY_PATH + ${CMAKE_FIND_ROOT_PATH}/local/lib + ${CMAKE_FIND_ROOT_PATH}/lib +) + +# Adjust the default behaviour of the FIND_XXX() commands: +# search headers and libraries in the target environment, search +# programs in the host environment +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + +# Tell pkg-config not to look at the target environment's .pc files. +# Setting PKG_CONFIG_LIBDIR sets the default search directory, but we have to +# set PKG_CONFIG_PATH as well to prevent pkg-config falling back to the host's +# path. +set(ENV{PKG_CONFIG_LIBDIR} ${CMAKE_FIND_ROOT_PATH}/lib/pkgconfig) +set(ENV{PKG_CONFIG_PATH} ${CMAKE_FIND_ROOT_PATH}/lib/pkgconfig) + +set(ENV{MINGDIR} ${CMAKE_FIND_ROOT_PATH}) diff --git a/host/cmake/Toolchains/oe-sdk_cross.cmake b/host/cmake/Toolchains/oe-sdk_cross.cmake index ea77815c9..f8ef0157c 100644 --- a/host/cmake/Toolchains/oe-sdk_cross.cmake +++ b/host/cmake/Toolchains/oe-sdk_cross.cmake @@ -9,5 +9,3 @@ set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_NATIVE_SYSROOT} $ENV{OECORE_TARGET_SYSROOT set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) -set ( ORC_INCLUDE_DIRS $ENV{OECORE_TARGET_SYSROOT}/usr/include/orc-0.4 ) -set ( ORC_LIBRARY_DIRS $ENV{OECORE_TARGET_SYSROOT}/usr/lib ) |