From b8357b86962f13162519fe58dd125714e7feef7e Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 6 Mar 2013 00:47:21 +0000 Subject: [PATCH] - updated cmake to output more info regarding finding libircclient and better support for ircclcient - cleanup too many exclamations in finding ftgl libs --- mk/cmake/Modules/FindFTGL.cmake | 4 ++-- mk/cmake/Modules/FindIrcclient.cmake | 24 ++++++++++++++++++++++-- source/shared_lib/CMakeLists.txt | 6 +++--- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/mk/cmake/Modules/FindFTGL.cmake b/mk/cmake/Modules/FindFTGL.cmake index 393111683..43405f2fe 100644 --- a/mk/cmake/Modules/FindFTGL.cmake +++ b/mk/cmake/Modules/FindFTGL.cmake @@ -19,11 +19,11 @@ ENDIF() IF (FTGL_LIBRARY AND FTGL_INCLUDE_DIR) SET(FTGL_FOUND "YES") - message(STATUS "!!!!!!!!!!!!!!!!!!!!!!!!!!!!! FTGL lib ALREADY FOUND in: [${FTGL_LIBRARY}]") + message(STATUS "** FTGL lib ALREADY FOUND in: [${FTGL_LIBRARY}]") ELSE (FTGL_LIBRARY AND FTGL_INCLUDE_DIR) IF(FTGL_LIBRARY_PATH) - message(STATUS "!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Searching for FTGL lib in custom path: [${FTGL_LIBRARY_PATH}]") + message(STATUS "** Searching for FTGL lib in custom path: [${FTGL_LIBRARY_PATH}]") ENDIF() FIND_PATH(FTGL_INCLUDE_DIR FTGL/ftgl.h diff --git a/mk/cmake/Modules/FindIrcclient.cmake b/mk/cmake/Modules/FindIrcclient.cmake index 4adb7deb5..4644a7c6c 100644 --- a/mk/cmake/Modules/FindIrcclient.cmake +++ b/mk/cmake/Modules/FindIrcclient.cmake @@ -39,8 +39,18 @@ FIND_PATH(IRCCLIENT_INCLUDE_DIR libircclient.h /opt ) +SET(IRCCLIENT_FIND_LIBRARIES ircclient) + +OPTION(WANT_STATIC_LIBS "builds as many static libs as possible" OFF) +OPTION(FORCE_IRCCLIENT_DYNAMIC_LIBS "force the use of dynamic libs for IRCCLIENT" OFF) +MESSAGE(STATUS "Force IRCCLient dynamic: ${FORCE_IRCCLIENT_DYNAMIC_LIBS}") + +IF(WANT_STATIC_LIBS AND NOT FORCE_IRCCLIENT_DYNAMIC_LIBS) + SET(IRCCLIENT_FIND_LIBRARIES libircclient.a) +ENDIF() + FIND_LIBRARY(IRCCLIENT_LIBRARY - NAMES ircclient + NAMES ${IRCCLIENT_FIND_LIBRARIES} HINTS $ENV{IRCCLIENTDIR} PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64 @@ -59,6 +69,16 @@ FIND_LIBRARY(IRCCLIENT_LIBRARY # handle the QUIETLY and REQUIRED arguments and set IRCCLIENT_FOUND to TRUE if # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(IRCCLIENT DEFAULT_MSG IRCCLIENT_LIBRARY IRCCLIENT_INCLUDE_DIR) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(IRCCLIENT DEFAULT_MSG IRCCLIENT_LIBRARY IRCCLIENT_INCLUDE_DIR) + +IF(IRCCLIENT_FOUND) + + MESSAGE(STATUS "Found IRCClient include path: ${IRCCLIENT_INCLUDE_DIR} libs: ${IRCCLIENT_LIBRARY}") + +ELSE() + + MESSAGE(STATUS "**** WARNING: IRCClient NOT FOUND include path: ${IRCCLIENT_INCLUDE_DIR} libs: ${IRCCLIENT_LIBRARY}") + +ENDIF() MARK_AS_ADVANCED(IRCCLIENT_LIBRARY IRCCLIENT_INCLUDE_DIR) diff --git a/source/shared_lib/CMakeLists.txt b/source/shared_lib/CMakeLists.txt index 80a760f4a..a8cb33664 100644 --- a/source/shared_lib/CMakeLists.txt +++ b/source/shared_lib/CMakeLists.txt @@ -361,10 +361,10 @@ option(ENABLE_FRIBIDI "Enable FriBIDi support" ON) option(DISABLE_IRCCLIENT "Disable libircclient support" OFF) IF(NOT DISABLE_IRCCLIENT) - IF(NOT WANT_STATIC_LIBS) - MESSAGE(STATUS "*** Searching for libircclient since WANT_STATIC_LIBS is off ...") + #IF(NOT WANT_STATIC_LIBS) + MESSAGE(STATUS "*** Searching for libircclient since WANT_STATIC_LIBS is: ${WANT_STATIC_LIBS} ...") FIND_PACKAGE(Ircclient) - ENDIF() + #ENDIF() if(NOT IRCCLIENT_FOUND) MESSAGE(STATUS "*** Using EMBEDDED libircclient since this system does not have it... IRCCLIENT_FOUND [${IRCCLIENT_FOUND}]")