summaryrefslogtreecommitdiff
path: root/gr-utils/python/modtool/gr-newmod
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2014-10-13 13:44:16 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2014-10-13 13:44:16 -0700
commite6fe7162e8fd41eef2140529f0e1b8bcfbde0ae9 (patch)
tree7d94201bf549a44cd9431acb51e037c69208e24c /gr-utils/python/modtool/gr-newmod
parent037ddca197674da611f2a8ffceab45e9134eb9bc (diff)
parentc80fcdb0b3955923625c9561302ac81612958bfc (diff)
Merge branch 'maint'
Diffstat (limited to 'gr-utils/python/modtool/gr-newmod')
-rw-r--r--gr-utils/python/modtool/gr-newmod/CMakeLists.txt32
1 files changed, 28 insertions, 4 deletions
diff --git a/gr-utils/python/modtool/gr-newmod/CMakeLists.txt b/gr-utils/python/modtool/gr-newmod/CMakeLists.txt
index 677144a984..0513f44086 100644
--- a/gr-utils/python/modtool/gr-newmod/CMakeLists.txt
+++ b/gr-utils/python/modtool/gr-newmod/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright 2011,2012 Free Software Foundation, Inc.
+# Copyright 2011,2012,2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -17,7 +17,6 @@
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-
########################################################################
# Project setup
########################################################################
@@ -32,7 +31,8 @@ if(NOT CMAKE_BUILD_TYPE)
endif(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
+#make sure our local CMake Modules path comes first
+list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
########################################################################
# Compiler specific setup
@@ -81,6 +81,26 @@ set(GR_PKG_LIBEXEC_DIR ${GR_LIBEXEC_DIR}/${CMAKE_PROJECT_NAME})
set(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks)
########################################################################
+# On Apple only, set install name and use rpath correctly, if not already set
+########################################################################
+if(APPLE)
+ if(NOT CMAKE_INSTALL_NAME_DIR)
+ set(CMAKE_INSTALL_NAME_DIR
+ ${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE
+ PATH "Library Install Name Destination Directory" FORCE)
+ endif(NOT CMAKE_INSTALL_NAME_DIR)
+ if(NOT CMAKE_INSTALL_RPATH)
+ set(CMAKE_INSTALL_RPATH
+ ${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE
+ PATH "Library Install RPath" FORCE)
+ endif(NOT CMAKE_INSTALL_RPATH)
+ if(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
+ set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE
+ BOOL "Do Build Using Library Install RPath" FORCE)
+ endif(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
+endif(APPLE)
+
+########################################################################
# Find gnuradio build dependencies
########################################################################
find_package(CppUnit)
@@ -155,6 +175,10 @@ add_subdirectory(docs)
########################################################################
# Install cmake search helper for this library
########################################################################
+if(NOT CMAKE_MODULES_DIR)
+ set(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake)
+endif(NOT CMAKE_MODULES_DIR)
+
install(FILES cmake/Modules/howtoConfig.cmake
- DESTINATION lib/cmake/howto
+ DESTINATION ${CMAKE_MODULES_DIR}/howto
)