--- CMakeLists.txt.orig 2015-07-25 20:27:13 UTC +++ CMakeLists.txt @@ -29,6 +29,11 @@ cmake_minimum_required(VERSION 2.6) project(gnuradio CXX C) enable_testing() +cmake_policy(SET CMP0026 OLD) +cmake_policy(SET CMP0043 OLD) +cmake_policy(SET CMP0045 OLD) +cmake_policy(SET CMP0046 OLD) + #make sure our local CMake Modules path comes first list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules) @@ -144,6 +149,14 @@ string(REPLACE "\n" " \\n" COMPILER_INFO ######################################################################## include(GrPlatform) #define LIB_SUFFIX set(GR_RUNTIME_DIR bin CACHE PATH "Path to install all binaries") +######################################################################## +# FreeBSD libdata vs. lib +# +if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") +set(GR_PKGCONFIG_DIR libdata${LIB_SUFFIX}) +else() +set(GR_PKGCONFIG_DIR lib${LIB_SUFFIX}) +endif() set(GR_LIBRARY_DIR lib${LIB_SUFFIX} CACHE PATH "Path to install libraries") set(GR_INCLUDE_DIR include CACHE PATH "Path to install header files") set(GR_DATA_DIR share CACHE PATH "Base location for data") @@ -229,6 +242,42 @@ add_custom_target(uninstall include(GrBoost) ######################################################################## +# FreeBSD iconv +######################################################################## +if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + message( "-- Adding iconv for FreeBSD") +message ("-- ICONV_LIB = ${ICONV_LIB}") + + set (ICONV_INCLUDE_DIR ${ICONV_PREFIX}/include) + if (${ICONV_LIB} STREQUAL "X-liconv") + find_library(ICONV_LIBRARY + NAMES iconv + PATHS ${ICONV_PREFIX}/lib + ) + else() + find_library(ICONV_LIBRARY + NAMES c + PATHS ${ICONV_PREFIX}/lib + ) + endif() + +message ("-- LIBICONV_PLUG = ${LIBICONV_PLUG}") +message ("-- ICONV_PREFIX = ${ICONV_PREFIX}") +message ("-- ICONV_INCLUDE_DIRS = ${ICONV_INCLUDE_DIRS}") +message ("-- ICONV_INCLUDE_DIR = ${ICONV_INCLUDE_DIR}") +message ("-- ICONV_LIB_DIRS = ${ICONV_LIB_DIRS}") +message ("-- ICONV_LIBRARY = ${ICONV_LIBRARY}") +else() + find_path(ICONV_INCLUDE_DIR + NAMES iconv.h + PATHS ${ICONV_INCLUDE_DIRS} + ) + find_library(ICONV_LIBRARY + NAMES iconv + PATHS ${ICONV_LIB_DIRS} + ) +endif() +######################################################################## # Enable python component ######################################################################## find_package(PythonLibs 2) @@ -354,11 +403,13 @@ GR_LOGGING() ######################################################################## # Distribute the README file ######################################################################## +if(ENABLE_DOCS) install( FILES README README.hacking DESTINATION ${GR_PKG_DOC_DIR} COMPONENT "docs" ) +endif() ######################################################################## # The following dependency libraries are needed by all gr modules: