diff options
author | Josh Blum | 2011-10-25 11:25:54 -0700 |
---|---|---|
committer | Josh Blum | 2011-10-25 11:25:54 -0700 |
commit | 112a6d92f4a82815f67c3558324373618657905e (patch) | |
tree | c2c564e079c093b68b65747b0a984060cc21e2be /cmake | |
parent | aae6c1ef27f5cacb949832a5bc3d403c5853c77b (diff) | |
download | gnuradio-112a6d92f4a82815f67c3558324373618657905e.tar.gz gnuradio-112a6d92f4a82815f67c3558324373618657905e.tar.bz2 gnuradio-112a6d92f4a82815f67c3558324373618657905e.zip |
cmake: only make libtool file when libtool found
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/CMakeMacroLibtoolFile.cmake | 5 | ||||
-rw-r--r-- | cmake/Modules/GrMiscUtils.cmake | 7 | ||||
-rw-r--r-- | cmake/Modules/GrSwig.cmake | 7 |
3 files changed, 15 insertions, 4 deletions
diff --git a/cmake/Modules/CMakeMacroLibtoolFile.cmake b/cmake/Modules/CMakeMacroLibtoolFile.cmake index a9e7f4bcb..2ec791207 100644 --- a/cmake/Modules/CMakeMacroLibtoolFile.cmake +++ b/cmake/Modules/CMakeMacroLibtoolFile.cmake @@ -6,6 +6,11 @@ #ADD_LIBRARY(foo SHARED kfoo1.cpp kfoo2.cpp) #CREATE_LIBTOOL_FILE(foo /lib/kde3) +if(DEFINED __INCLUDED_CREATE_LIBTOOL_FILE) + return() +endif() +set(__INCLUDED_CREATE_LIBTOOL_FILE TRUE) + MACRO(GET_TARGET_PROPERTY_WITH_DEFAULT _variable _target _property _default_value) GET_TARGET_PROPERTY (${_variable} ${_target} ${_property}) IF (${_variable} MATCHES NOTFOUND) diff --git a/cmake/Modules/GrMiscUtils.cmake b/cmake/Modules/GrMiscUtils.cmake index 9d947e9a5..22bfc8324 100644 --- a/cmake/Modules/GrMiscUtils.cmake +++ b/cmake/Modules/GrMiscUtils.cmake @@ -128,8 +128,11 @@ function(GR_LIBRARY_FOO target) if(LIBRARY_EXTRAS) #create .la file before changing props - include(CMakeMacroLibtoolFile) - CREATE_LIBTOOL_FILE(${target} /${GR_LIBRARY_DIR}) + find_program(LIBTOOL libtool) + if(LIBTOOL) + include(CMakeMacroLibtoolFile) + CREATE_LIBTOOL_FILE(${target} /${GR_LIBRARY_DIR}) + endif(LIBTOOL) #give the library a special name with ultra-zero soversion set_target_properties(${target} PROPERTIES LIBRARY_OUTPUT_NAME ${target}-${LIBVER} SOVERSION "0.0.0") diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake index 7f2018b53..6055c6356 100644 --- a/cmake/Modules/GrSwig.cmake +++ b/cmake/Modules/GrSwig.cmake @@ -83,7 +83,6 @@ endmacro(GR_SWIG_MAKE) ######################################################################## macro(GR_SWIG_INSTALL) - include(CMakeMacroLibtoolFile) include(CMakeParseArgumentsCopy) CMAKE_PARSE_ARGUMENTS(GR_SWIG_INSTALL "" "DESTINATION;COMPONENT" "TARGETS" ${ARGN}) @@ -99,7 +98,11 @@ macro(GR_SWIG_INSTALL) COMPONENT ${GR_SWIG_INSTALL_COMPONENT} ) - CREATE_LIBTOOL_FILE(${SWIG_MODULE_${name}_REAL_NAME} /${GR_SWIG_INSTALL_DESTINATION}) + find_program(LIBTOOL libtool) + if(LIBTOOL) + include(CMakeMacroLibtoolFile) + CREATE_LIBTOOL_FILE(${SWIG_MODULE_${name}_REAL_NAME} /${GR_SWIG_INSTALL_DESTINATION}) + endif(LIBTOOL) endforeach(name) |