summaryrefslogtreecommitdiff
path: root/gr-howto-write-a-block-cmake/cmake/Modules/GrMiscUtils.cmake
diff options
context:
space:
mode:
authorTom Rondeau2011-11-12 18:30:13 -0500
committerTom Rondeau2011-11-12 18:30:13 -0500
commit0e7c799e4ef7a392a8ffe47170666908bfcb183f (patch)
treedeb32d3810b4cb636ecfa24ff613a1aad1fd409c /gr-howto-write-a-block-cmake/cmake/Modules/GrMiscUtils.cmake
parentc9c20b9051b997ab53a27869094648f15e0dccae (diff)
parent9a25332b706b1ffadf8cdf9b405e89c37a1e2278 (diff)
downloadgnuradio-0e7c799e4ef7a392a8ffe47170666908bfcb183f.tar.gz
gnuradio-0e7c799e4ef7a392a8ffe47170666908bfcb183f.tar.bz2
gnuradio-0e7c799e4ef7a392a8ffe47170666908bfcb183f.zip
Merge branch 'master' of gnuradio.org:gnuradio
Diffstat (limited to 'gr-howto-write-a-block-cmake/cmake/Modules/GrMiscUtils.cmake')
-rw-r--r--gr-howto-write-a-block-cmake/cmake/Modules/GrMiscUtils.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/gr-howto-write-a-block-cmake/cmake/Modules/GrMiscUtils.cmake b/gr-howto-write-a-block-cmake/cmake/Modules/GrMiscUtils.cmake
index 540b97b93..0e1f40027 100644
--- a/gr-howto-write-a-block-cmake/cmake/Modules/GrMiscUtils.cmake
+++ b/gr-howto-write-a-block-cmake/cmake/Modules/GrMiscUtils.cmake
@@ -164,6 +164,7 @@ function(GR_LIBRARY_FOO target)
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink ${target_name} ${CMAKE_CURRENT_BINARY_DIR}/lib${target}.so
COMMAND ${CMAKE_COMMAND} -E create_symlink ${target_name} ${CMAKE_CURRENT_BINARY_DIR}/lib${target}-${LIBVER}.so.0
+ COMMAND ${CMAKE_COMMAND} -E touch ${target_name} #so the symlinks point to something valid so cmake 2.6 will install
)
#and install the extra symlinks
@@ -200,5 +201,10 @@ function(GR_GEN_TARGET_DEPS name var)
if(ARGN)
add_dependencies(${name} ${ARGN})
endif(ARGN)
- set(${var} "DEPENDS;${name};COMMAND;${name}" PARENT_SCOPE)
+
+ if(CMAKE_CROSSCOMPILING)
+ set(${var} "DEPENDS;${name}" PARENT_SCOPE) #cant call command when cross
+ else()
+ set(${var} "DEPENDS;${name};COMMAND;${name}" PARENT_SCOPE)
+ endif()
endfunction(GR_GEN_TARGET_DEPS)