From 32084a0e3983ceb707675e5268a5e9a3c9b7e778 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 23 Mar 2013 18:11:14 -0500 Subject: [PATCH] Fix make command when compiled with CMake --- CMakeLists.txt | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc102ae4..1bc0c702 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,9 +112,23 @@ if( NOT DEFINED KDELIBS_DOXYDIR ) set( KDELIBS_DOXYDIR "${TDE_HTML_DIR}/en/tdelibs-apidocs" ) endif( ) + +if( NOT DEFINED FULL_MAKE_COMMAND ) + find_program( FULL_MAKE_COMMAND + NAMES gmake ) + if( NOT FULL_MAKE_COMMAND ) + find_program( FULL_MAKE_COMMAND + NAMES make ) + if( NOT FULL_MAKE_COMMAND ) + tde_message_fatal( "Either make or gmake was NOT found." ) + endif( NOT FULL_MAKE_COMMAND ) + endif( NOT FULL_MAKE_COMMAND ) +endif( NOT DEFINED FULL_MAKE_COMMAND ) + + if( NOT DEFINED MAKE_COMMAND ) - set( MAKE_COMMAND "gmake" ) -endif( ) + GET_FILENAME_COMPONENT( MAKE_COMMAND "${FULL_MAKE_COMMAND}" NAME ) +endif( NOT DEFINED MAKE_COMMAND ) ###### global compiler settings #################