From 1095f9ee65d1d78ff1a75c2424b7c1eeaa7e040c Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Fri, 17 Mar 2023 10:50:25 -0400 Subject: [PATCH] Removed unused directory. JIRA: CXX-12545 --- .../cmake/modules/FindSKESA.cmake | 26 - .../cmake/unused/CMakeChecks.BerkeleyDB.cmake | 23 - .../cmake/unused/CMakeChecks.compress.cmake | 35 - .../cmake/unused/CMakeChecks.image.cmake | 41 - .../cmake/unused/CMakeChecks.pcre.cmake | 24 - .../cmake/unused/CMakeChecks.sqlite3.cmake | 33 - .../cmake/unused/CMakeChecks.wxwidgets.cmake | 60 - .../cmake/unused/FindBerkeleyDB.cmake | 40 - .../cmake/unused/FindExternalLibrary.cmake | 251 ---- src/build-system/cmake/unused/FindFTGL.cmake | 146 --- src/build-system/cmake/unused/FindLZO.cmake | 43 - .../cmake/unused/FindMongoCXX.cmake | 47 - src/build-system/cmake/unused/FindMysql.cmake | 73 -- .../cmake/unused/FindOSMesa.cmake | 47 - src/build-system/cmake/unused/FindPCRE.cmake | 65 - .../cmake/unused/FindSqlite3.cmake | 105 -- .../cmake/unused/FindZooKeeper.cmake | 28 - .../cmake/unused/FindwxWidgets.cmake | 1044 ----------------- .../cmake/unused/HunterGate.cmake | 529 --------- .../cmake/unused/NCBI-ToolkitConfig.cmake.in | 141 --- .../cmake/unused/Sqlite3Config.cmake | 25 - src/build-system/cmake/unused/cmake-configure | 545 --------- .../cmake/unused/configure-custom.sh | 42 - .../cmake/unused/generate_dependencies.sh | 73 -- .../ncbi-berkeleydb-config.cmake | 62 - .../ncbi-defaults/ncbi-ftgl-config.cmake | 53 - .../ncbi-defaults/ncbi-glew-config.cmake | 54 - .../ncbi-defaults/ncbi-gnutls-config.cmake | 57 - .../ncbi-defaults/ncbi-leveldb-config.cmake | 65 - .../ncbi-defaults/ncbi-libxml2-config.cmake | 65 - .../ncbi-defaults/ncbi-libxslt-config.cmake | 66 -- .../ncbi-defaults/ncbi-lzo-config.cmake | 53 - .../ncbi-defaults/ncbi-mongocxx-config.cmake | 96 -- .../ncbi-defaults/ncbi-opengl-config.cmake | 63 - .../ncbi-defaults/ncbi-osmesa-config.cmake | 53 - .../ncbi-defaults/ncbi-sqlite3-config.cmake | 67 -- 36 files changed, 4240 deletions(-) delete mode 100644 src/build-system/cmake/modules/FindSKESA.cmake delete mode 100644 src/build-system/cmake/unused/CMakeChecks.BerkeleyDB.cmake delete mode 100644 src/build-system/cmake/unused/CMakeChecks.compress.cmake delete mode 100644 src/build-system/cmake/unused/CMakeChecks.image.cmake delete mode 100644 src/build-system/cmake/unused/CMakeChecks.pcre.cmake delete mode 100644 src/build-system/cmake/unused/CMakeChecks.sqlite3.cmake delete mode 100644 src/build-system/cmake/unused/CMakeChecks.wxwidgets.cmake delete mode 100644 src/build-system/cmake/unused/FindBerkeleyDB.cmake delete mode 100644 src/build-system/cmake/unused/FindExternalLibrary.cmake delete mode 100644 src/build-system/cmake/unused/FindFTGL.cmake delete mode 100644 src/build-system/cmake/unused/FindLZO.cmake delete mode 100644 src/build-system/cmake/unused/FindMongoCXX.cmake delete mode 100644 src/build-system/cmake/unused/FindMysql.cmake delete mode 100644 src/build-system/cmake/unused/FindOSMesa.cmake delete mode 100644 src/build-system/cmake/unused/FindPCRE.cmake delete mode 100644 src/build-system/cmake/unused/FindSqlite3.cmake delete mode 100755 src/build-system/cmake/unused/FindZooKeeper.cmake delete mode 100644 src/build-system/cmake/unused/FindwxWidgets.cmake delete mode 100644 src/build-system/cmake/unused/HunterGate.cmake delete mode 100644 src/build-system/cmake/unused/NCBI-ToolkitConfig.cmake.in delete mode 100644 src/build-system/cmake/unused/Sqlite3Config.cmake delete mode 100755 src/build-system/cmake/unused/cmake-configure delete mode 100755 src/build-system/cmake/unused/configure-custom.sh delete mode 100755 src/build-system/cmake/unused/generate_dependencies.sh delete mode 100644 src/build-system/cmake/unused/ncbi-defaults/ncbi-berkeleydb-config.cmake delete mode 100644 src/build-system/cmake/unused/ncbi-defaults/ncbi-ftgl-config.cmake delete mode 100644 src/build-system/cmake/unused/ncbi-defaults/ncbi-glew-config.cmake delete mode 100644 src/build-system/cmake/unused/ncbi-defaults/ncbi-gnutls-config.cmake delete mode 100644 src/build-system/cmake/unused/ncbi-defaults/ncbi-leveldb-config.cmake delete mode 100644 src/build-system/cmake/unused/ncbi-defaults/ncbi-libxml2-config.cmake delete mode 100644 src/build-system/cmake/unused/ncbi-defaults/ncbi-libxslt-config.cmake delete mode 100644 src/build-system/cmake/unused/ncbi-defaults/ncbi-lzo-config.cmake delete mode 100644 src/build-system/cmake/unused/ncbi-defaults/ncbi-mongocxx-config.cmake delete mode 100644 src/build-system/cmake/unused/ncbi-defaults/ncbi-opengl-config.cmake delete mode 100644 src/build-system/cmake/unused/ncbi-defaults/ncbi-osmesa-config.cmake delete mode 100644 src/build-system/cmake/unused/ncbi-defaults/ncbi-sqlite3-config.cmake diff --git a/src/build-system/cmake/modules/FindSKESA.cmake b/src/build-system/cmake/modules/FindSKESA.cmake deleted file mode 100644 index e270b2f52c8..00000000000 --- a/src/build-system/cmake/modules/FindSKESA.cmake +++ /dev/null @@ -1,26 +0,0 @@ -# -# -# Find the wgMLST library, part of SKESA distribution. - -# This will include -# WGMLST_FOUND -# WGMLST_INCLUDE_DIRS -# WGMLST_LIBRARIES -# WGMLST_LIBPATH - -find_package(LIBWGMLST - PATHS /panfs/pan1/gpipe/ThirdParty/skesa-1.1/${NCBI_COMPILER}-${NCBI_COMPILER_VERSION_DOTTED} - NO_DEFAULT_PATH -) - -if (LIBWGMLST_FOUND) - set(WGMLST_FOUND TRUE) - set(WGMLST_INCLUDE_DIRS ${LIBWGMLST_INCLUDE_DIRS}) - set(WGMLST_LIBRARIES ${LIBWGMLST_LIBRARIES}) - set(WGMLST_VERSION_STRING ${LIBWGMLST_VERSION}) - - set(WGMLST_LIBPATH -L${LIBWGMLST_LIBRARY_DIRS} -Wl,-rpath,${LIBWGMLST_LIBRARY_DIRS}) - message(STATUS "Found WGMLST: ${WGMLST_LIBRARIES} (found version \"${WGMLST_VERSION_STRING}\")") -else() - set(WGMLST_FOUND FALSE) -endif() diff --git a/src/build-system/cmake/unused/CMakeChecks.BerkeleyDB.cmake b/src/build-system/cmake/unused/CMakeChecks.BerkeleyDB.cmake deleted file mode 100644 index 2149b788309..00000000000 --- a/src/build-system/cmake/unused/CMakeChecks.BerkeleyDB.cmake +++ /dev/null @@ -1,23 +0,0 @@ -include(CheckFunctionExists) -include(CheckIncludeFile) - -set(CMAKE_FIND_FRAMEWORK "FIRST") - -find_package(BerkeleyDB) -if (BERKELEYDB_FOUND) - set(BERKELEYDB_INCLUDE ${BerkeleyDB_INCLUDE_DIR}) - set(BERKELEYDB_LIBS ${BerkeleyDB_LIBRARIES}) - - set(HAVE_BDB 1) - set(HAVE_BERKELEY_DB 1) - set(HAVE_BERKELEY_DB_CXX 1) - - # - # As a blanket statement, we now include BerkeleyDB everywhere - # This avoids a serious insidious version skew if we have both the - # system-installed BerkeleyDB libraries and a custom version of BerkeleyDB - include_directories(SYSTEM ${BERKELEYDB_INCLUDE}) - -endif (BERKELEYDB_FOUND) - - diff --git a/src/build-system/cmake/unused/CMakeChecks.compress.cmake b/src/build-system/cmake/unused/CMakeChecks.compress.cmake deleted file mode 100644 index fe431096849..00000000000 --- a/src/build-system/cmake/unused/CMakeChecks.compress.cmake +++ /dev/null @@ -1,35 +0,0 @@ -############################################################################ -# -# Compression libraries - -set(_foo_CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH}) -if (WIN32) - set(CMAKE_PREFIX_PATH ${ZLIB_ROOT}) -endif() - -find_package(ZLIB) -find_package(BZip2) -find_package(LZO) - -# For backward compatibility -set(Z_INCLUDE ${ZLIB_INCLUDE_DIR}) -set(BZ2_INCLUDE ${BZIP2_INCLUDE_DIR}) - -set(Z_LIBS ${ZLIB_LIBRARIES}) -set(BZ2_LIBS ${BZIP2_LIBRARIES}) - -set(CMPRS_INCLUDE ${Z_INCLUDE} ${BZ2_INCLUDE}) -set(CMPRS_LIBS ${Z_LIBS} ${BZ2_LIBS} ${LZO_LIBS}) - -if (LZO_FOUND) - set(LZO_INCLUDE ${LZO_INCLUDE_DIR}) - set(LZO_LIBS ${LZO_LIBRARIES}) - set(HAVE_LIBLZO True) - set(CMPRS_INCLUDE ${CMPRS_INCLUDE} ${LZO_INCLUDE}) - set(CMPRS_LIBS ${CMPRS_LIBS} ${LZO_LIBS}) -endif() - -set(COMPRESS_LIBS xcompress ${CMPRS_LIBS}) - -set(CMAKE_PREFIX_PATH ${_foo_CMAKE_PREFIX_PATH}) - diff --git a/src/build-system/cmake/unused/CMakeChecks.image.cmake b/src/build-system/cmake/unused/CMakeChecks.image.cmake deleted file mode 100644 index 8ebce767814..00000000000 --- a/src/build-system/cmake/unused/CMakeChecks.image.cmake +++ /dev/null @@ -1,41 +0,0 @@ -############################################################################ -# -# Various image-format libraries -set(_foo_CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH}) - -if (WIN32) - set(CMAKE_PREFIX_PATH ${JPEG_ROOT} ${PNG_ROOT} ${TIFF_ROOT}) -endif() - -find_package(JPEG) -find_package(PNG) -find_package(TIFF) -find_package(GIF) -find_package(Freetype) -if (FREETYPE_FOUND) - find_package(FTGL) -endif() - -# -# For backward compatibility - -set(IMAGE_INCLUDE_DIR - ${JPEG_INCLUDE_DIR} - ${PNG_INCLUDE_DIR} - ${TIFF_INCLUDE_DIR} - ${GIF_INCLUDE_DIR}) -set(IMAGE_LIBS - ${JPEG_LIBRARIES} - ${PNG_LIBRARIES} - ${TIFF_LIBRARIES} - ${GIF_LIBRARIES}) - - -# FreeType, FTGL -set(FREETYPE_INCLUDE ${FREETYPE_INCLUDE_DIRS}) -set(FREETYPE_LIBS ${FREETYPE_LIBRARIES}) -set(FTGL_INCLUDE ${FTGL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS}) -set(FTGL_LIBS ${FTGL_LIBRARIES} ${FREETYPE_LIBRARIES}) - -set(CMAKE_PREFIX_PATH ${_foo_CMAKE_PREFIX_PATH}) - diff --git a/src/build-system/cmake/unused/CMakeChecks.pcre.cmake b/src/build-system/cmake/unused/CMakeChecks.pcre.cmake deleted file mode 100644 index 42483f86ccb..00000000000 --- a/src/build-system/cmake/unused/CMakeChecks.pcre.cmake +++ /dev/null @@ -1,24 +0,0 @@ -############################################################################ -# -# PCRE additions -# -# Perl-Compatible Regular Expressions (PCRE) - -find_package(PCRE) -set(PCRE_INCLUDE ${PCRE_INCLUDE_DIR}) -set(PCRE_LIBS ${PCRE_LIBRARIES}) -if (PCRE_FOUND) - set(HAVE_LIBPCRE 1) -endif() - -if (WIN32 AND HAVE_LIBPCRE) - set(USE_LOCAL_PCRE TRUE) -endif() - -if (HAVE_LIBPCRE AND NOT USE_LOCAL_PCRE) - set(PCRE_LIBS -lpcre) -else(HAVE_LIBPCRE AND NOT USE_LOCAL_PCRE) - set(USE_LOCAL_PCRE 1 CACHE INTERNAL "Using local PCRE due to system library absence") - set(PCRE_LIBS regexp) -endif(HAVE_LIBPCRE AND NOT USE_LOCAL_PCRE) - diff --git a/src/build-system/cmake/unused/CMakeChecks.sqlite3.cmake b/src/build-system/cmake/unused/CMakeChecks.sqlite3.cmake deleted file mode 100644 index f29ad86055f..00000000000 --- a/src/build-system/cmake/unused/CMakeChecks.sqlite3.cmake +++ /dev/null @@ -1,33 +0,0 @@ -include(CheckFunctionExists) -include(CheckIncludeFile) - -find_package(Sqlite3) - -set(SQLITE3_INCLUDE ${SQLITE3_INCLUDE_DIR}) -set(SQLITE3_LIBS ${SQLITE3_LIBRARY}) -set(SQLITE3_STATIC_LIBS ${SQLITE3_LIBS}) - -if (SQLITE3_FOUND) - set(CMAKE_REQUIRED_LIBRARIES_OLD "${CMAKE_REQUIRED_LIBRARIES}") - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${SQLITE3_LIBRARY} ${LIBS}) - - check_symbol_exists(sqlite3_unlock_notify ${SQLITE3_INCLUDE_DIR}/sqlite3.h HAVE_SQLITE3_UNLOCK_NOTIFY) - if (HAVE_SQLITE3_UNLOCK_NOTIFY) - message(STATUS " SQLite3: Found sqlite3_unlock_notify") - endif() - set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES_OLD}") - - check_include_file(sqlite3async.h HAVE_SQLITE3ASYNC_H -I${SQLITE3_INCLUDE_DIR}) - if (HAVE_SQLITE3ASYNC_H) - message(STATUS " SQLite3: Found sqlite3async.h") - endif() - - # - # As a blanket statement, we now include SQLite3 everywhere - # This avoids a serious insidious version skew if we have both the - # system-installed SQLite3 libraries and a custom version of SQLite3 - include_directories(SYSTEM ${SQLITE3_INCLUDE}) - -endif(SQLITE3_FOUND) - - diff --git a/src/build-system/cmake/unused/CMakeChecks.wxwidgets.cmake b/src/build-system/cmake/unused/CMakeChecks.wxwidgets.cmake deleted file mode 100644 index f8f3776ae3e..00000000000 --- a/src/build-system/cmake/unused/CMakeChecks.wxwidgets.cmake +++ /dev/null @@ -1,60 +0,0 @@ -# wxWidgets -set(_foo_CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}") -if (WIN32) - set(CMAKE_PREFIX_PATH ${WXWIDGETS_ROOT}) -else() - set(CMAKE_PREFIX_PATH "${NCBI_TOOLS_ROOT}/wxWidgets-3.1.3-ncbi1/${STD_BUILD_TYPE}/bin") -endif() - -set(wxWidgets_USE_UNICODE ON) -set(wxWidgets_USE_SHAREED_LIBS ${BUILD_SHARED_LIBS}) - -if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug") - set(wxWidgets_CONFIG_OPTIONS "--debug=yes") - set(wxWidgets_USE_DEBUG ON) -else() - set(wxWidgets_USE_DEBUG OFF) -endif() - -find_package(GTK2) -if (GTK2_FOUND) - set(WXWIDGETS_INCLUDE - ${NCBI_TOOLS_ROOT}/wxWidgets-3.1.3-ncbi1/${NCBI_BUILD_TYPE}/lib/wx/include/gtk2-ansi-3.1 - ${NCBI_TOOLS_ROOT}/wxWidgets-3.1.3-ncbi1/include/wx-3.1 - ${GTK2_INCLUDE_DIRS} - ) - set(_wxp ${NCBI_TOOLS_ROOT}/wxWidgets-3.1.3-ncbi1/${NCBI_BUILD_TYPE}/lib/lib) - set(_wxs -3.1.so) - set(WXWIDGETS_LIBS - ${_wxp}wx_gtk2_gl${_wxs} - ${_wxp}wx_gtk2_richtext${_wxs} - ${_wxp}wx_gtk2_aui${_wxs} - ${_wxp}wx_gtk2_propgrid${_wxs} - ${_wxp}wx_gtk2_xrc${_wxs} - ${_wxp}wx_gtk2_html${_wxs} - ${_wxp}wx_gtk2_qa${_wxs} - ${_wxp}wx_gtk2_adv${_wxs} - ${_wxp}wx_gtk2_core${_wxs} - ${_wxp}wx_base_xml${_wxs} - ${_wxp}wx_base_net${_wxs} - ${_wxp}wx_base${_wxs} - ${GTK2_LIBRARIES} - ) - set(WXWIDGETS_FOUND YES) -endif() - -set(CMAKE_PREFIX_PATH "${_foo_CMAKE_PREFIX_PATH}") - - -#FIXME: this is broken -#include( ${wxWidgets_USE_FILE} ) - -## message(STATUS "wxWidgets: CONFIG_OPTIONS = ${wxWidgets_CONFIG_OPTIONS}") -## message(STATUS "wxWidgets: DEBUG = ${wxWidgets_USE_DEBUG}") -## message(STATUS "wxWidgets: SHARED_LIBS = ${wxWidgets_USE_SHAREED_LIBS}") -## message(STATUS "wxWidgets: CXX_FLAGS = ${wxWidgets_CXX_FLAGS}") -## message(STATUS "wxWidgets: DEFINITIONS = ${wxWidgets_DEFINITIONS}") -## message(STATUS "wxWidgets: LIBRARIES = ${wxWidgets_LIBRARIES}") -## message(STATUS "wxWidgets: USE_FILE = ${wxWidgets_USE_FILE}") - - diff --git a/src/build-system/cmake/unused/FindBerkeleyDB.cmake b/src/build-system/cmake/unused/FindBerkeleyDB.cmake deleted file mode 100644 index 53f58c99446..00000000000 --- a/src/build-system/cmake/unused/FindBerkeleyDB.cmake +++ /dev/null @@ -1,40 +0,0 @@ -# Find Berkley DB - -if (APPLE) - set(BUILD_PREFIX "Clang320-") -endif (APPLE) - -set(BerkeleyDB_FOUND NO) - -FIND_PATH( BERKELEYDB_INCLUDE_DIR db.h - PATHS ${NCBI_TOOLS_ROOT}/BerkeleyDB/include/ - /usr/local/include - /usr/include - NO_DEFAULT_PATH - ) - -IF (BERKELEYDB_INCLUDE_DIR) - FIND_LIBRARY( BERKELEYDB_LIBRARY NAMES db - PATHS ${CMAKE_PREFIX_PATH} - "${NCBI_TOOLS_ROOT}/BerkeleyDB/${BUILD_PREFIX}${CMAKE_BUILD_TYPE}/" - /usr/local/lib - /usr/lib - NO_DEFAULT_PATH - ) - - IF (BERKELEYDB_LIBRARY) - set(BerkeleyDB_FOUND Yes) - get_filename_component(BERKELEYDB_LIBDIR ${BERKELEYDB_LIBRARY} DIRECTORY) - get_filename_component(BERKELEYDB_LIBNAME ${BERKELEYDB_LIBRARY} NAME) - get_filename_component(BERKELEYDB_LIBDIR ${BERKELEYDB_LIBDIR} REALPATH) - set(BERKELEYDB_LIBRARY ${BERKELEYDB_LIBDIR}/${BERKELEYDB_LIBNAME}) - - set(BERKELEYDB_LIBRARIES ${BERKELEYDB_LIBRARY} -Wl,-rpath,${BERKELEYDB_LIBDIR}) - ELSE (BERKELEYDB_LIBRARY) - MESSAGE(WARNING "Include ${BERKELEYDB_INCLUDE}/db.h found, but no library in ${NCBI_TOOLS_ROOT}/BerkeleyDB/${BUILD_PREFIX}${CMAKE_BUILD_TYPE}/ ") - ENDIF (BERKELEYDB_LIBRARY) - - MESSAGE(STATUS "Found BerkeleyDB: ${BERKELEYDB_LIBRARY}") - MESSAGE(STATUS " BerkeleyDB Libraries: ${BERKELEYDB_LIBRARIES}") - MESSAGE(STATUS " BerkeleyDB INCLUDE: ${BERKELEYDB_INCLUDE_DIR}") -ENDIF (BERKELEYDB_INCLUDE_DIR) diff --git a/src/build-system/cmake/unused/FindExternalLibrary.cmake b/src/build-system/cmake/unused/FindExternalLibrary.cmake deleted file mode 100644 index 9e1450dbd47..00000000000 --- a/src/build-system/cmake/unused/FindExternalLibrary.cmake +++ /dev/null @@ -1,251 +0,0 @@ -include(CMakeParseArguments) - -function(update_final_message) - list(GET ARGN 0 ARG_LIBNAME_ORIG) - if (${ARGC} GREATER 1) - list(GET ARGN 1 ARG_PRINT_NAME) - else() - set(ARG_PRINT_NAME ${ARG_LIBNAME_ORIG}) - endif() - string(TOUPPER ${ARG_LIBNAME_ORIG} ARG_LIBNAME) - if ("${ARG_LIBNAME}_DISABLED" STREQUAL "yes") - set(EXTERNAL_LIBRARIES_COMMENT "${EXTERNAL_LIBRARIES_COMMENT}\n${ARG_PRINT_NAME}: disabled" PARENT_SCOPE) - elseif(${${ARG_LIBNAME}_FOUND}) - set(EXTERNAL_LIBRARIES_COMMENT "${EXTERNAL_LIBRARIES_COMMENT}\n${ARG_PRINT_NAME}: ${${ARG_LIBNAME}_LIBS}\n${ARG_PRINT_NAME} include: ${${ARG_LIBNAME}_INCLUDE}" PARENT_SCOPE) - else() - set(EXTERNAL_LIBRARIES_COMMENT "${EXTERNAL_LIBRARIES_COMMENT}\n${ARG_PRINT_NAME}: not found" PARENT_SCOPE) - endif() -endfunction() - -function(find_external_library) - cmake_parse_arguments(ARG "DYNAMIC_ONLY" "PACKAGE_NAME" "EXTRALIBS" ${ARGN}) - #list(LENGTH "${ARG_EXTRALIBS}" COUNT) - #message("EXTRALIBS: ${ARG_EXTRALIBS} COUNT: ${COUNT}") - list(GET ARGN 0 ARG_LIBNAME_ORIG) - string(TOUPPER ${ARG_LIBNAME_ORIG} ARG_LIBNAME) - if ((NOT "${BUILD_SHARED_LIBS}" STREQUAL "ON") AND (NOT ${ARG_DYNAMIC_ONLY})) - set(CMAKE_FIND_LIBRARY_SUFFIXES_OLD "${CMAKE_FIND_LIBRARY_SUFFIXES}") - set(CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_STATIC_LIBRARY_SUFFIX}") - set("LINKER_FLAG_PREFIX" "-Wl,-Bstatic") - set("LINKER_FLAG_SUFFIX" "-Wl,-Bdynamic") - find_external_library_impl("${ARGN}") - unset(LINKER_FLAG_PREFIX) - unset(LINKER_FLAG_SUFFIX) - set(CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES_OLD}") - if (${${ARG_LIBNAME}_FOUND}) - else () - #message("STATIC NOT FOUND, LOOKING FOR DYNAMIC") - find_external_library_impl("${ARGN}") - endif () - else () - find_external_library_impl("${ARGN}") - endif () - if (${${ARG_LIBNAME}_FOUND}) - set("${ARG_LIBNAME}_FOUND" ${${ARG_LIBNAME}_FOUND} PARENT_SCOPE) - set("${ARG_LIBNAME}_INCLUDE" ${${ARG_LIBNAME}_INCLUDE} PARENT_SCOPE) - #set(LIBS "") - #list(APPEND LIBS ${${ARG_LIBNAME}_LIBS}) - #list(APPEND LIBS ${ARG_EXTRALIBS}) - #set("${ARG_LIBNAME}_LIBS" ${LIBS} PARENT_SCOPE) - - list(APPEND ${ARG_LIBNAME}_LIBS ${ARG_EXTRALIBS}) - set("${ARG_LIBNAME}_LIBS" "${${ARG_LIBNAME}_LIBS}" PARENT_SCOPE) - - #list(APPEND ARG_EXTRALIBS ${${ARG_LIBNAME}_LIBS}) - #set("${ARG_LIBNAME}_LIBS" "${ARG_EXTRALIBS}" PARENT_SCOPE) - - #set(LIBS "${${ARG_LIBNAME}_LIBS};${ARG_EXTRALIBS}") - #string (REPLACE ";" " " LIBS_STR "${LIBS}") - #set("${ARG_LIBNAME}_LIBS" "${LIBS}" PARENT_SCOPE) - list(APPEND NCBI_MODULES_FOUND "${ARG_LIBNAME_ORIG}") - endif () -endfunction() - -function(convert_link_string FILES) - foreach(PATH ${FILES}) - get_filename_component(D "${PATH}" DIRECTORY) - get_filename_component(FFULL "${PATH}" NAME) - #set(SUBSTRING "${FFULL}" 3 -1 F) - string(REGEX MATCH ".a$" ISSTATIC ${FFULL}) - string(REGEX REPLACE "^lib" "" F0 ${FFULL}) - string(REGEX REPLACE ".(so|a)$" "" F ${F0}) - if (NOT ("${D}" STREQUAL "/usr/lib" OR "${D}" STREQUAL "/usr/lib64")) - if ("${RES}" STREQUAL "") - set(RES "-L${D}" "-l${F}") - else () - set(RES ${RES} "-L${D}" "-l${F}") - endif() - else () - if ("${RES}" STREQUAL "") - set(RES "-l${F}") - else () - set(RES ${RES} "-l${F}") - endif() - endif() - endforeach() - if (NOT "${ISSTATIC}" STREQUAL "") - set(CONVERTED_LIB_STRING ${LINKER_FLAG_PREFIX} ${RES} ${LINKER_FLAG_SUFFIX} PARENT_SCOPE) - else () - set(CONVERTED_LIB_STRING ${RES} PARENT_SCOPE) - endif() -endfunction() - -function(find_libraries) - cmake_parse_arguments(ARG "NO_DEFAULT_PATH;NO_CMAKE_ENVIRONMENT_PATH;NO_CMAKE_PATH;NO_SYSTEM_ENVIRONMENT_PATH;NO_CMAKE_SYSTEM_PATH" "PATH" "NAMES;HINTS" ${ARGN}) - list(GET ARGN 0 OUT_VARIABLE_NAME) - foreach (LIBNAME ${ARG_NAMES}) - unset(LIB_OUT CACHE) - find_library(LIB_OUT NAMES ${LIBNAME} - HINTS ${ARG_HINTS} - ${ARG_NO_DEFAULT_PATH} - ${ARG_NO_CMAKE_ENVIRONMENT_PATH} - ${ARG_NO_CMAKE_PATH} - ${ARG_NO_SYSTEM_ENVIRONMENT_PATH} - ${ARG_NO_CMAKE_SYSTEM_PATH}) - if ("${LIB_OUT}" STREQUAL "LIB_OUT-NOTFOUND") - set(${${OUT_VARIABLE_NAME}} "${OUT_VARIABLE_NAME}-NOTFOUND" PARENT_SCOPE) - return () - endif() - set(RES ${RES} ${LIB_OUT}) - endforeach() - #message("OUT: " ${RES}) - set("${OUT_VARIABLE_NAME}" ${RES} PARENT_SCOPE) -endfunction() - -function(find_external_library_impl) - list(GET ARGN 0 ARG_LIBNAME_ORIG) - string(TOUPPER ${ARG_LIBNAME_ORIG} ARG_LIBNAME) - cmake_parse_arguments(ARG "DO_NOT_UPDATE_MESSAGE" "INCLUDES;HINTS;INCLUDE_HINTS;LIBS_HINTS;EXTRAFLAGS;PRINT_NAME;PACKAGE_NAME" "LIBS" ${ARGN}) - #message("LIBNAME: ${ARG_LIBNAME}") - - if (NOT "${ARG_HINTS}" STREQUAL "") - set(ARG_INCLUDE_HINTS "${ARG_HINTS}/include") - set(ARG_LIBS_HINTS "${ARG_HINTS}/lib") - endif() - - if ("${ARG_PACKAGE_NAME}" STREQUAL "") - set(ARG_PACKAGE_NAME "${ARG_LIBNAME_ORIG}") - endif () - string(TOUPPER ${ARG_PACKAGE_NAME} ARG_PACKAGE_NAME_UPPER) - - #debug - #message("ARG_LIBNAME_ORIG ${ARG_LIBNAME_ORIG} LIBNAME ${ARG_LIBNAME} VALUE ${${ARG_LIBNAME}}") - #message("HINTS ${ARG_HINTS} INCLUDE_HINTS ${ARG_INCLUDE_HINTS} LIBS_HINTS ${ARG_LIBS_HINTS}") - #message("INCLUDES ${ARG_INCLUDES} LIBS ${ARG_LIBS} EXTRAFLAGS ${ARG_EXTRAFLAGS}") - - if (NOT ARG_LIBNAME) - message(FATAL_ERROR "find_external_library: library name not provided") - endif() - - if ("${ARG_LIBNAME}_DISABLED" STREQUAL "yes") - set("${ARG_LIBNAME}_FOUND" false) - return() - endif() - - #find_library and find_path declare their output variables as cached (see cmake type system) - #so, we need to reset them - unset(EXT_LIBRARY CACHE) - unset(EXT_INCLUDE_DIR CACHE) - - if (NOT "${${ARG_LIBNAME}}" STREQUAL "") - find_libraries(EXT_LIBRARY NAMES ${ARG_LIBS} - PATH "${${ARG_LIBNAME}}/lib" - NO_DEFAULT_PATH - NO_CMAKE_ENVIRONMENT_PATH - NO_CMAKE_PATH - NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH) - #if (NOT "${EXT_INCLUDE_DIR}" STREQUAL "") - find_path(EXT_INCLUDE_DIR NAMES ${ARG_INCLUDES} - PATH "${${ARG_LIBNAME}}/include" - NO_DEFAULT_PATH - NO_CMAKE_ENVIRONMENT_PATH - NO_CMAKE_PATH - NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH) - #endif() - - elseif (NOT "${ARG_LIBS_HINTS}" STREQUAL "") - set(CMAKE_PREFIX_PATH_OLD "${CMAKE_PREFIX_PATH}") - set(CMAKE_PREFIX_PATH "${ARG_HINTS}") - find_package(${ARG_PACKAGE_NAME} QUIET) - set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH_OLD}") - - if (${${ARG_PACKAGE_NAME_UPPER}_FOUND}) - if (NOT "${${ARG_PACKAGE_NAME_UPPER}_INCLUDE_DIRS}" STREQUAL "") - set(EXT_INCLUDE_DIR "${${ARG_PACKAGE_NAME_UPPER}_INCLUDE_DIRS}") - endif () - if (NOT "${${ARG_PACKAGE_NAME_UPPER}_INCLUDE_DIR}" STREQUAL "") - set(EXT_INCLUDE_DIR "${${ARG_PACKAGE_NAME_UPPER}_INCLUDE_DIR}") - endif () - set("${ARG_LIBNAME}_FOUND" true PARENT_SCOPE) - set("${ARG_LIBNAME}_INCLUDE" "${EXT_INCLUDE_DIR}" PARENT_SCOPE) - if ("${ARG_EXTRAFLAGS}" STREQUAL "") - set("${ARG_LIBNAME}_LIBS" ${${ARG_PACKAGE_NAME_UPPER}_LIBRARIES} PARENT_SCOPE) - else () - convert_link_string("${${ARG_PACKAGE_NAME_UPPER}_LIBRARIES}") - set("${ARG_LIBNAME}_LIBS" ${CONVERTED_LIB_STRING} ${ARG_EXTRAFLAGS} PARENT_SCOPE) - endif () - message(STATUS "Found ${ARG_PACKAGE_NAME}: ${${ARG_PACKAGE_NAME_UPPER}_LIBRARIES}") - return() - else () - #message("${ARG_LIBNAME_ORIG} NOT FOUND AS PACKAGE") - #message("ARG_LIBS: ${ARG_LIBS} LIB_HINTS: ${ARG_LIBS_HINTS}") - find_libraries(EXT_LIBRARY NAMES ${ARG_LIBS} - HINTS - ${ARG_LIBS_HINTS}) - find_path(EXT_INCLUDE_DIR NAMES ${ARG_INCLUDES} - HINTS - ${ARG_INCLUDE_HINTS}) - endif() - - else() - find_package(${ARG_PACKAGE_NAME} QUIET) - if (${${ARG_PACKAGE_NAME_UPPER}_FOUND}) - if (NOT "${${ARG_PACKAGE_NAME_UPPER}_INCLUDE_DIRS}" STREQUAL "") - set(EXT_INCLUDE_DIR "${${ARG_PACKAGE_NAME_UPPER}_INCLUDE_DIRS}") - endif () - if (NOT "${${ARG_PACKAGE_NAME_UPPER}_INCLUDE_DIR}" STREQUAL "") - set(EXT_INCLUDE_DIR "${${ARG_PACKAGE_NAME_UPPER}_INCLUDE_DIR}") - endif () - #convert_link_string("${${ARG_PACKAGE_NAME_UPPER}_LIBRARIES}") - set("${ARG_LIBNAME}_FOUND" true PARENT_SCOPE) - set("${ARG_LIBNAME}_INCLUDE" "${EXT_INCLUDE_DIR}" PARENT_SCOPE) - #set("${ARG_LIBNAME}_LIBS" "${${ARG_PACKAGE_NAME_UPPER}_LIBRARIES}" "${ARG_EXTRAFLAGS}" PARENT_SCOPE) - if ("${ARG_EXTRAFLAGS}" STREQUAL "") - set("${ARG_LIBNAME}_LIBS" ${${ARG_PACKAGE_NAME_UPPER}_LIBRARIES} PARENT_SCOPE) - else () - convert_link_string("${${ARG_PACKAGE_NAME_UPPER}_LIBRARIES}") - set("${ARG_LIBNAME}_LIBS" ${CONVERTED_LIB_STRING} ${ARG_EXTRAFLAGS} PARENT_SCOPE) - endif() - message(STATUS "Found ${ARG_PACKAGE_NAME}: ${${ARG_PACKAGE_NAME_UPPER}_LIBRARIES}") - return() - else () - #message("${ARG_LIBNAME_ORIG} NOT FOUND AS PACKAGE") - find_libraries(EXT_LIBRARY NAMES ${ARG_LIBS}) - find_path(EXT_INCLUDE_DIR NAMES ${ARG_INCLUDES}) - endif() - endif() - - #message(FATAL_ERROR "EXT_LIBRARY: ${EXT_LIBRARY} EXT_INCLUDE_DIR: ${EXT_INCLUDE_DIR}") - FIND_PACKAGE_HANDLE_STANDARD_ARGS("${ARG_LIBNAME}" - REQUIRED_VARS EXT_LIBRARY EXT_INCLUDE_DIR) - unset(FINAL_LIBS) - if (${${ARG_LIBNAME}_FOUND}) - set("${ARG_LIBNAME}_INCLUDE" "${EXT_INCLUDE_DIR}" PARENT_SCOPE) - if ("${ARG_EXTRAFLAGS}" STREQUAL "") - set("${ARG_LIBNAME}_LIBS" ${EXT_LIBRARY} PARENT_SCOPE) - else () - convert_link_string("${EXT_LIBRARY}") - set("${ARG_LIBNAME}_LIBS" ${CONVERTED_LIB_STRING} ${ARG_EXTRAFLAGS} PARENT_SCOPE) - endif() - #set("${ARG_LIBNAME}_LIBS" ${LINKER_FLAG_PREFIX} ${CONVERTED_LIB_STRING} ${LINKER_FLAG_SUFFIX} PARENT_SCOPE) - #set("${ARG_LIBNAME}_LIBS" ${CONVERTED_LIB_STRING} ${ARG_EXTRAFLAGS} PARENT_SCOPE) - #set("${ARG_LIBNAME}_LIBS" "${EXT_LIBRARY}" "${ARG_EXTRAFLAGS}" PARENT_SCOPE) - endif() - set("${ARG_LIBNAME}_FOUND" ${${ARG_LIBNAME}_FOUND} PARENT_SCOPE) - if (NOT ${${ARG_LIBNAME}_FOUND}) - message(STATUS "Could NOT find ${ARG_PACKAGE_NAME}") - endif() - -endfunction() diff --git a/src/build-system/cmake/unused/FindFTGL.cmake b/src/build-system/cmake/unused/FindFTGL.cmake deleted file mode 100644 index 2045e3988c3..00000000000 --- a/src/build-system/cmake/unused/FindFTGL.cmake +++ /dev/null @@ -1,146 +0,0 @@ -# - Find FTGL -# Find the native FTGL headers and libraries. -# from project OpenFlipper -# -# FTGL_INCLUDE_DIR - where to find FTGL.h, etc. -# FTGL_LIBRARIES - List of libraries when using FTGL. -# FTGL_FOUND - True if FTGL found. - -GET_FILENAME_COMPONENT(module_file_path ${CMAKE_CURRENT_LIST_FILE} PATH ) - -# Look for the header file. -FIND_PATH(FTGL_INCLUDE_DIR NAMES FTGL/ftgl.h - PATH_SUFFIXES include - PATHS /usr - /usr/local - ../../External - "C:\\libs\\ftgl\\ftgl" - ${FTGL_ROOT} - ${module_file_path}/../../../External) -#MARK_AS_ADVANCED(FTGL_INCLUDE_DIR) - -if ( WIN32 ) - # Look for the library. - FIND_LIBRARY(FTGL_LIBRARY_RELEASE NAMES ftgl ftgl_dynamic_MTD - PATH_SUFFIXES lib64 lib Build - PATHS /usr - /usr/local - /usr - /usr/local - ../../External - ${FTGL_ROOT} - "C:\\libs\\ftgl\\msvc" - ${module_file_path}/../../../External) - - FIND_LIBRARY(FTGL_LIBRARY_DEBUG NAMES ftgl_d ftgld - PATH_SUFFIXES lib64 lib Build - PATHS /usr - /usr/local - /usr - /usr/local - ../../External - ${FTGL_ROOT} - "C:\\libs\\ftgl\\msvc" - ${module_file_path}/../../../External) - - set( FTGL_LIBRARY optimized;${FTGL_LIBRARY_RELEASE};debug;${FTGL_LIBRARY_DEBUG} ) - - # Get paths to libraries. Required to link to libs and copy dlls from there - GET_FILENAME_COMPONENT( FTGL_LIBRARY_DIR_RELEASE ${FTGL_LIBRARY_RELEASE} PATH ) - GET_FILENAME_COMPONENT( FTGL_LIBRARY_DIR_DEBUG ${FTGL_LIBRARY_DEBUG} PATH ) - list(APPEND FTGL_LIBRARY_DIRS ${FTGL_LIBRARY_DIR_DEBUG} ${FTGL_LIBRARY_DIR_RELEASE} ) - -else(WIN32) - FIND_LIBRARY(FTGL_LIBRARY NAMES ftgl ftgl_dynamic_MTD - PATHS /usr/lib64 - /usr/local/lib64 - /usr/lib - /usr/local/lib - ../../External/lib - ${FTGL_ROOT} - "C:\\libs\\ftgl\\msvc\\Build" - ${module_file_path}/../../../External/lib) - - -endif(WIN32) - - -#MARK_AS_ADVANCED(FTGL_LIBRARY) - -IF( WIN32 AND PREFER_STATIC_LIBRARIES ) - SET( FTGL_STATIC_LIBRARY_NAME ftgl_static_MTD ) - IF( MSVC80 ) - SET( FTGL_STATIC_LIBRARY_NAME ftgl_static_MTD_vc8 ) - ELSEIF( MSVC90 ) - SET( FTGL_STATIC_LIBRARY_NAME ftgl_static_MTD_vc9 ) - ENDIF( MSVC80 ) - - FIND_LIBRARY( FTGL_STATIC_LIBRARY NAMES ${FTGL_STATIC_LIBRARY_NAME} - PATHS /usr/lib64 - /usr/local/lib64 - /usr/lib - /usr/local/lib - ../../External/lib - ${module_file_path}/../../../External/lib ) - MARK_AS_ADVANCED(FTGL_STATIC_LIBRARY) - - FIND_LIBRARY( FTGL_STATIC_DEBUG_LIBRARY NAMES ${FTGL_STATIC_LIBRARY_NAME}_d - PATHS /usr/lib64 - /usr/local/lib64 - /usr/lib - /usr/local/lib - ../../External/lib - ${module_file_path}/../../../External/lib ) - MARK_AS_ADVANCED(FTGL_STATIC_DEBUG_LIBRARY) - - IF( FTGL_STATIC_LIBRARY OR FTGL_STATIC_DEBUG_LIBRARY ) - SET( FTGL_STATIC_LIBRARIES_FOUND 1 ) - ENDIF( FTGL_STATIC_LIBRARY OR FTGL_STATIC_DEBUG_LIBRARY ) -ENDIF( WIN32 AND PREFER_STATIC_LIBRARIES ) - -IF( FTGL_LIBRARY OR FTGL_STATIC_LIBRARIES_FOUND ) - SET( FTGL_LIBRARIES_FOUND 1 ) -ENDIF( FTGL_LIBRARY OR FTGL_STATIC_LIBRARIES_FOUND ) - -# Copy the results to the output variables. -IF(FTGL_INCLUDE_DIR AND FTGL_LIBRARIES_FOUND) - SET(FTGL_FOUND 1) - - IF( WIN32 AND PREFER_STATIC_LIBRARIES AND FTGL_STATIC_LIBRARIES_FOUND ) - IF(FTGL_STATIC_LIBRARY) - SET(FTGL_LIBRARIES optimized ${FTGL_STATIC_LIBRARY} ) - ELSE(FTGL_STATIC_LIBRARY) - SET(FTGL_LIBRARIES optimized ${FTGL_STATIC_LIBRARY_NAME} ) - MESSAGE( STATUS, "FTGL static release libraries not found. Release build might not work." ) - ENDIF(FTGL_STATIC_LIBRARY) - - IF(FTGL_STATIC_DEBUG_LIBRARY) - SET(FTGL_LIBRARIES ${FTGL_LIBRARIES} debug ${FTGL_STATIC_DEBUG_LIBRARY} ) - ELSE(FTGL_STATIC_DEBUG_LIBRARY) - SET(FTGL_LIBRARIES ${FTGL_LIBRARIES} debug ${FTGL_STATIC_LIBRARY_NAME}_d ) - MESSAGE( STATUS, "FTGL static debug libraries not found. Debug build might not work." ) - ENDIF(FTGL_STATIC_DEBUG_LIBRARY) - - SET( FTGL_LIBRARY_STATIC 1 ) - ELSE( WIN32 AND PREFER_STATIC_LIBRARIES AND FTGL_STATIC_LIBRARIES_FOUND ) - SET(FTGL_LIBRARIES ${FTGL_LIBRARY}) - ENDIF( WIN32 AND PREFER_STATIC_LIBRARIES AND FTGL_STATIC_LIBRARIES_FOUND ) - - SET(FTGL_INCLUDE_DIR ${FTGL_INCLUDE_DIR}) -ELSE(FTGL_INCLUDE_DIR AND FTGL_LIBRARIES_FOUND) - SET(FTGL_FOUND 0) - SET(FTGL_LIBRARIES) - SET(FTGL_INCLUDE_DIR) -ENDIF(FTGL_INCLUDE_DIR AND FTGL_LIBRARIES_FOUND) - -# Report the results. -IF(NOT FTGL_FOUND) - SET(FTGL_DIR_MESSAGE - "FTGL was not found. Make sure FTGL_LIBRARY and FTGL_INCLUDE_DIR are set to the directories containing the include and lib files for FTGL. If you do not have the library you will not be able to use the Text node.") - IF(FTGL_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "${FTGL_DIR_MESSAGE}") - ELSEIF(NOT FTGL_FIND_QUIETLY) - MESSAGE(STATUS "${FTGL_DIR_MESSAGE}") - ELSE(NOT FTGL_FIND_QUIETLY) - ENDIF(FTGL_FIND_REQUIRED) -ENDIF(NOT FTGL_FOUND) diff --git a/src/build-system/cmake/unused/FindLZO.cmake b/src/build-system/cmake/unused/FindLZO.cmake deleted file mode 100644 index 8ef721d81cd..00000000000 --- a/src/build-system/cmake/unused/FindLZO.cmake +++ /dev/null @@ -1,43 +0,0 @@ -# Find liblzo2 -# LZO_FOUND - system has the LZO library -# LZO_INCLUDE_DIR - the LZO include directory -# LZO_LIBRARIES - The libraries needed to use LZO - -if (LZO_INCLUDE_DIR AND LZO_LIBRARIES) - # in cache already - SET(LZO_FOUND TRUE) -else (LZO_INCLUDE_DIR AND LZO_LIBRARIES) - FIND_PATH(LZO_INCLUDE_DIR lzo/lzo1x.h - ${LZO_ROOT}/include/ - /usr/include/ - /usr/local/include/ - /sw/lib/ - /sw/local/lib/ - ) - - if(WIN32 AND MSVC) - FIND_LIBRARY(LZO_LIBRARIES NAMES liblzo - PATHS - ${CMAKE_PREFIX_PATH} - ${LZO_ROOT}/lib - ) - endif(WIN32 AND MSVC) - - if (LZO_INCLUDE_DIR AND LZO_LIBRARIES) - set(LZO_FOUND TRUE) - endif (LZO_INCLUDE_DIR AND LZO_LIBRARIES) - - if (LZO_FOUND) - if (NOT LZO_FIND_QUIETLY) - message(STATUS "Found LZO: ${LZO_LIBRARIES}") - endif (NOT LZO_FIND_QUIETLY) - else (LZO_FOUND) - if (LZO_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find LZO") - else() - message(STATUS "Could NOT find LZO") - endif (LZO_FIND_REQUIRED) - endif (LZO_FOUND) - - MARK_AS_ADVANCED(LZO_INCLUDE_DIR LZO_LIBRARIES) -endif (LZO_INCLUDE_DIR AND LZO_LIBRARIES) diff --git a/src/build-system/cmake/unused/FindMongoCXX.cmake b/src/build-system/cmake/unused/FindMongoCXX.cmake deleted file mode 100644 index ab0e2fcbbfd..00000000000 --- a/src/build-system/cmake/unused/FindMongoCXX.cmake +++ /dev/null @@ -1,47 +0,0 @@ -# Mike DiCuccio (dicuccio@ncbi.nlm.nih.gov) -# -# Find the Mongo-CXX driver -# -# This will set: -# MONGOCXX_FOUND -# MONGOCXX_INCLUDE_DIRS -# MONGOCXX_LIBRARIES -# BSONCXX_LIBRARIES -# BSONCXX_INCLUDE_DIRS -# -# Use as: ${MONGOCXX_LIBPATH} ${MONGOCXX_LIBRARIES} ${BSONCXX_LIBRARIES} - -find_package(libbsoncxx REQUIRED - PATHS $ENV{NCBI}/mongodb-3.6.3/ - NO_DEFAULT_PATH -) - -find_package(libmongocxx REQUIRED - PATHS $ENV{NCBI}/mongodb-3.6.3/ - NO_DEFAULT_PATH -) - - - - - -if (libmongocxx_FOUND AND libbsoncxx_FOUND) - set(MONGOCXX_FOUND TRUE) - - set(MONGOCXX_INCLUDE_DIRS ${LIBMONGOCXX_INCLUDE_DIRS}) - set(MONGOCXX_LIBRARIES ${LIBMONGOCXX_LIBRARIES}) - set(MONGOCXX_VERSION_STRING ${libmongocxx_VERSION}) - - set(BSONCXX_INCLUDE_DIRS ${LIBBSONCXX_INCLUDE_DIRS}) - set(BSONCXX_LIBRARIES ${LIBBSONCXX_LIBRARIES}) - set(BSONCXX_VERSION_STRING ${libbsoncxx_VERSION}) - - set(MONGOCXX_LIBPATH -L${LIBMONGOCXX_LIBRARY_DIRS} -Wl,-rpath,${LIBMONGOCXX_LIBRARY_DIRS}) - - message(STATUS "Found MongoDB: ${MONGOCXX_LIBRARIES} ${BSONCXX_LIBRARIES} (found version \"${MONGOCXX_VERSION_STRING}\")") -else() - set(MONGOCXX_FOUND FALSE) - message(STATUS "Cannot find MongoDB") -endif() - - diff --git a/src/build-system/cmake/unused/FindMysql.cmake b/src/build-system/cmake/unused/FindMysql.cmake deleted file mode 100644 index b9dd4eacf19..00000000000 --- a/src/build-system/cmake/unused/FindMysql.cmake +++ /dev/null @@ -1,73 +0,0 @@ -# Find MySQL - -# Find the native MySQL includes and library -# -# MYSQL_INCLUDE_DIR - where to find mysql.h, etc. -# MYSQL_LIBRARIES - List of libraries when using MySQL. -# MYSQL_FOUND - True if MySQL found. - -if(MYSQL_INCLUDE_DIR OR MYSQL_) - # Already in cache, be silent - SET(MYSQL_FIND_QUIETLY TRUE) -endif() - -if(NOT WIN32) - find_program(MYSQL_CONFIG_EXECUTABLE mysql_config - /usr/bin/ - /usr/local/bin - $ENV{MYSQL_DIR}/bin - ) -endif() - -if(MYSQL_CONFIG_EXECUTABLE) - execute_process(COMMAND ${MYSQL_CONFIG_EXECUTABLE} --cflags OUTPUT_VARIABLE MYSQL_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) - separate_arguments(MYSQL_CFLAGS) - string( REGEX MATCH "-I[^;]+" MYSQL_INCLUDE_DIR "${MYSQL_CFLAGS}" ) - string( REPLACE "-I" "" MYSQL_INCLUDE_DIR "${MYSQL_INCLUDE_DIR}") - string( REGEX REPLACE "-I[^;]+;" "" MYSQL_CFLAGS "${MYSQL_CFLAGS}" ) - execute_process(COMMAND ${MYSQL_CONFIG_EXECUTABLE} --libs OUTPUT_VARIABLE MYSQL_LIBRARIES OUTPUT_STRIP_TRAILING_WHITESPACE) -else() - find_path(MYSQL_INCLUDE_DIR mysql.h - /usr/local/mysql/include - /usr/local/include/mysql - /usr/local/include - /usr/include/mysql - /usr/include - /usr/mysql/include - $ENV{MYSQL_DIR}/include - ) - set(MYSQL_NAMES mysqlclient mysqlclient_r) - find_library(MYSQL_LIBRARY NAMES ${MYSQL_NAMES} - PATHS /usr/local/mysql/lib /usr/local/lib /usr/lib $ENV{MYSQL_DIR}/lib $ENV{MYSQL_DIR}/lib/opt - ) - set(MYSQL_LIBRARIES ${MYSQL_LIBRARY}) -endif() - -if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) - set(MYSQL_FOUND TRUE) - if(WIN32) - string(REPLACE mysqlclient libmysql libmysql ${MYSQL_LIBRARY}) - set(MYSQL_LIBRARIES ${libmysql} ${MYSQL_LIBRARIES}) - endif() -else() - set(MYSQL_FOUND FALSE) - set(MYSQL_LIBRARIES ) -endif() - -if(MYSQL_FOUND) - if(NOT MYSQL_FIND_QUIETLY) - message(STATUS "Found MySQL libraries: ${MYSQL_LIBRARIES}") - message(STATUS "Found MySQL includes: ${MYSQL_INCLUDE_DIR}") - endif() -else() - if(MYSQL_FIND_REQUIRED) - message(STATUS "Looked for MySQL libraries named ${MYSQL_NAMES}.") - message(FATAL_ERROR "Could NOT find MySQL library") - endif() -endif() - -mark_as_advanced( - MYSQL_CONFIG_EXECUTABLE - MYSQL_LIBRARY - MYSQL_INCLUDE_DIR -) diff --git a/src/build-system/cmake/unused/FindOSMesa.cmake b/src/build-system/cmake/unused/FindOSMesa.cmake deleted file mode 100644 index 6e3c3611b8a..00000000000 --- a/src/build-system/cmake/unused/FindOSMesa.cmake +++ /dev/null @@ -1,47 +0,0 @@ -# Try to find Mesa off-screen library and include dir. -# Once done this will define -# -# OSMESA_FOUND - true if OSMesa has been found -# OSMESA_INCLUDE_DIR - where the GL/osmesa.h can be found -# OSMESA_LIBRARY - Link this to use OSMesa - - -if(NOT OSMESA_INCLUDE_DIR) - - # If we have a root defined look there first - if(OSMESA_ROOT) - find_path(OSMESA_INCLUDE_DIR GL/osmesa.h PATHS ${OSMESA_ROOT}/include - NO_DEFAULT_PATH - ) - endif() - - if(NOT OSMESA_INCLUDE_DIR) - find_path(OSMESA_INCLUDE_DIR GL/osmesa.h PATHS - /usr/openwin/share/include - /opt/graphics/OpenGL/include - ) - endif() -endif() - -# This may be left blank if OSMesa symbols are included -# in the main Mesa library -if(NOT OSMESA_LIBRARY) - # If we have a root defined look there first - if(OSMESA_ROOT) - find_library(OSMESA_LIBRARY OSMesa PATHS ${OSMESA_ROOT}/lib - NO_DEFAULT_PATH - ) - endif() - - if(NOT OSMESA_LIBRARY) - find_library(OSMESA_LIBRARY OSMesa PATHS - /opt/graphics/OpenGL/lib - /usr/openwin/lib - ) - endif() -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(OSMesa DEFAULT_MSG OSMESA_LIBRARY OSMESA_INCLUDE_DIR) - -mark_as_advanced(OSMESA_INCLUDE_DIR OSMESA_LIBRARY) diff --git a/src/build-system/cmake/unused/FindPCRE.cmake b/src/build-system/cmake/unused/FindPCRE.cmake deleted file mode 100644 index 3f7f3bbe615..00000000000 --- a/src/build-system/cmake/unused/FindPCRE.cmake +++ /dev/null @@ -1,65 +0,0 @@ -# Martin Konrad -# License: GPLv2/v3 -# -# Try to find libpcre (Perl Compatible Regular Expressions) -# -# Once done this will define -# -# PCRE_FOUND - system has libpcre -# PCRE_INCLUDE_DIR - the libpcre include directory -# PCRE_LIBRARY - where to find libpcre -# PCRE_LIBRARIES - Link these to use libpcre - -if(PCRE_INCLUDE_DIR AND PCRE_LIBRARIES) - # in cache already - set(PCRE_FOUND TRUE) -else(PCRE_INCLUDE_DIR AND PCRE_LIBRARIES) - if(NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - find_package(PkgConfig) - pkg_check_modules(PC_PCRE libpcre) - endif(NOT WIN32) - - find_path(PCRE_INCLUDE_DIR - NAMES - pcre.h - HINTS - ${PCRE_PKG_INCLUDE_DIRS} - PATHS - /usr/include - /usr/local/include - ) - - if (WIN32) - find_library(PCRE_LIBRARY - NAMES - libpcre - HINTS - ${PCRE_PKG_LIBRARY_DIRS} - PATHS - ${CMAKE_PREFIX_PATH} - ${PCRE_PKG_ROOT}/lib - ) - else (WIN32) - find_library(PCRE_LIBRARY - NAMES - pcre - HINTS - ${PCRE_PKG_LIBRARY_DIRS} - PATHS - /usr/lib - /usr/local/lib - ) - endif (WIN32) - set(PCRE_LIBRARIES ${PCRE_LIBRARY}) - - # handle the QUIETLY AND REQUIRED arguments AND set PCRE_FOUND to TRUE if - # all listed variables are TRUE - # include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(PCRE DEFAULT_MSG PCRE_LIBRARY PCRE_INCLUDE_DIR) - - mark_as_advanced(PCRE_INCLUDE_DIR PCRE_LIBRARY) -endif(PCRE_INCLUDE_DIR AND PCRE_LIBRARIES) - diff --git a/src/build-system/cmake/unused/FindSqlite3.cmake b/src/build-system/cmake/unused/FindSqlite3.cmake deleted file mode 100644 index 2e59b6cfcbd..00000000000 --- a/src/build-system/cmake/unused/FindSqlite3.cmake +++ /dev/null @@ -1,105 +0,0 @@ -# Find Sqlite3 -# ~~~~~~~~~~~~ -# Try NCBI layout first - -#message("FindSqlite3 SQLITE3_INCLUDE_DIR ${SQLITE3_INCLUDE_DIR}") -if (APPLE) - set(SQLITE3_NAME "sqlite-3.6.14.2-ncbi1") -else (APPLE) - set(SQLITE3_NAME "sqlite-3.7.13-ncbi1") -endif (APPLE) - -IF( SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY_RELEASE AND SQLITE3_LIBRARY_DEBUG ) - SET(SQLITE3_FIND_QUIETLY TRUE) -ENDIF( SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY_RELEASE AND SQLITE3_LIBRARY_DEBUG ) - -FIND_PATH( SQLITE3_INCLUDE_DIR sqlite3.h - PATHS ${NCBI_TOOLS_ROOT}/${SQLITE3_NAME}/include - NO_DEFAULT_PATH ) - -IF (SQLITE3_INCLUDE_DIR) - FIND_LIBRARY( SQLITE3_LIBRARY NAMES sqlite3 - PATHS ${NCBI_TOOLS_ROOT}/${SQLITE3_NAME}/${CMAKE_BUILD_TYPE}64MT/lib/ - NO_DEFAULT_PATH ) - - IF ("${SQLITE3_LIBRARY}" STREQUAL "") - MESSAGE(FATAL_ERROR "Include ${SQLITE3_INCLUDE_DIR}/sqlite3.h found, but no library in ${NCBI_TOOLS_ROOT}/${SQLITE3_NAME}/${CMAKE_BUILD_TYPE}64MT/lib/ ") - ELSE () - SET(SQLITE3_FOUND TRUE) - RETURN() - ENDIF () -ENDIF (SQLITE3_INCLUDE_DIR) - -# ~~~~~~~~~~~~ -# Copyright (c) 2007, Martin Dobias -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# -# CMake module to search for Sqlite3 library -# -# If it's found it sets SQLITE3_FOUND to TRUE -# and following variables are set: -# SQLITE3_INCLUDE_DIR -# SQLITE3_LIBRARY - - -# FIND_PATH and FIND_LIBRARY normally search standard locations -# before the specified paths. To search non-standard paths first, -# FIND_* is invoked first with specified paths and NO_DEFAULT_PATH -# and then again with no specified paths to search the default -# locations. When an earlier FIND_* succeeds, subsequent FIND_*s -# searching for the same item do nothing. - -# try to use framework on mac -# want clean framework path, not unix compatibility path -IF (APPLE) - IF (CMAKE_FIND_FRAMEWORK MATCHES "FIRST" - OR CMAKE_FRAMEWORK_PATH MATCHES "ONLY" - OR NOT CMAKE_FIND_FRAMEWORK) - SET (CMAKE_FIND_FRAMEWORK_save ${CMAKE_FIND_FRAMEWORK} CACHE STRING "" FORCE) - SET (CMAKE_FIND_FRAMEWORK "ONLY" CACHE STRING "" FORCE) - #FIND_PATH(SQLITE3_INCLUDE_DIR SQLite3/sqlite3.h) - FIND_LIBRARY(SQLITE3_LIBRARY SQLite3) - IF (SQLITE3_LIBRARY) - # FIND_PATH doesn't add "Headers" for a framework - SET (SQLITE3_INCLUDE_DIR ${SQLITE3_LIBRARY}/Headers CACHE PATH "Path to a file.") - ENDIF (SQLITE3_LIBRARY) - SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE) - ENDIF () -ENDIF (APPLE) - -FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h - "$ENV{LIB_DIR}/include" - "$ENV{LIB_DIR}/include/sqlite" - #mingw - c:/msys/local/include - NO_DEFAULT_PATH - ) -FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h) - -FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 sqlite3_i PATHS - $ENV{LIB} - /usr/lib - "$ENV{LIB_DIR}/lib" - #mingw - c:/msys/local/lib - NO_DEFAULT_PATH - ) -FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3) - -IF (SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY) - SET(SQLITE3_FOUND TRUE) -ENDIF (SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY) - - -IF (SQLITE3_FOUND) - - MESSAGE(STATUS "Found Sqlite3: ${SQLITE3_LIBRARY}") - -ELSE (SQLITE3_FOUND) - - IF (SQLITE3_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find Sqlite3") - ENDIF (SQLITE3_FIND_REQUIRED) - -ENDIF (SQLITE3_FOUND) diff --git a/src/build-system/cmake/unused/FindZooKeeper.cmake b/src/build-system/cmake/unused/FindZooKeeper.cmake deleted file mode 100755 index 0ef23e31124..00000000000 --- a/src/build-system/cmake/unused/FindZooKeeper.cmake +++ /dev/null @@ -1,28 +0,0 @@ -set(ZooKeeper_FOUND NO) - -FIND_PATH( ZOOKEEPER_INCLUDE_DIR zookeeper.h - PATHS /usr/include/zookeeper - ) - -IF (ZOOKEEPER_INCLUDE_DIR) - FIND_LIBRARY( ZOOKEEPER_LIBRARY NAMES libzookeeper_mt.a - PATHS /usr/lib - /usr/lib64 - ) - - IF (ZOOKEEPER_LIBRARY) - set(ZooKeeper_FOUND Yes) - get_filename_component(ZOOKEEPER_LIBDIR ${ZOOKEEPER_LIBRARY} DIRECTORY) - get_filename_component(ZOOKEEPER_LIBNAME ${ZOOKEEPER_LIBRARY} NAME) - get_filename_component(ZOOKEEPER_LIBDIR ${ZOOKEEPER_LIBDIR} REALPATH) - set(ZOOKEEPER_LIBRARY ${ZOOKEEPER_LIBDIR}/${ZOOKEEPER_LIBNAME}) - - set(ZOOKEEPER_LIBRARIES ${ZOOKEEPER_LIBRARY} -Wl,-rpath,${ZOOKEEPER_LIBDIR} -pthread) - ELSE (ZOOKEEPER_LIBRARY) - MESSAGE(WARNING "Include ${ZOOKEEPER_INCLUDE}/zookeeper.h found, but no library") - ENDIF (ZOOKEEPER_LIBRARY) - - MESSAGE(STATUS "Found ZooKeeper: ${ZOOKEEPER_LIBRARY}") - MESSAGE(STATUS " ZooKeeper Libraries: ${ZOOKEEPER_LIBRARIES}") - MESSAGE(STATUS " ZooKeeper INCLUDE: ${ZOOKEEPER_INCLUDE_DIR}") -ENDIF (ZOOKEEPER_INCLUDE_DIR) diff --git a/src/build-system/cmake/unused/FindwxWidgets.cmake b/src/build-system/cmake/unused/FindwxWidgets.cmake deleted file mode 100644 index 5e6f3a5c656..00000000000 --- a/src/build-system/cmake/unused/FindwxWidgets.cmake +++ /dev/null @@ -1,1044 +0,0 @@ -# - Find a wxWidgets (a.k.a., wxWindows) installation. -# This module finds if wxWidgets is installed and selects a default -# configuration to use. wxWidgets is a modular library. To specify the -# modules that you will use, you need to name them as components to -# the package: -# -# find_package(wxWidgets COMPONENTS core base ...) -# -# There are two search branches: a windows style and a unix style. For -# windows, the following variables are searched for and set to -# defaults in case of multiple choices. Change them if the defaults -# are not desired (i.e., these are the only variables you should -# change to select a configuration): -# -# wxWidgets_ROOT_DIR - Base wxWidgets directory -# (e.g., C:/wxWidgets-2.6.3). -# wxWidgets_LIB_DIR - Path to wxWidgets libraries -# (e.g., C:/wxWidgets-2.6.3/lib/vc_lib). -# wxWidgets_CONFIGURATION - Configuration to use -# (e.g., msw, mswd, mswu, mswunivud, etc.) -# wxWidgets_EXCLUDE_COMMON_LIBRARIES -# - Set to TRUE to exclude linking of -# commonly required libs (e.g., png tiff -# jpeg zlib regex expat). -# -# For unix style it uses the wx-config utility. You can select between -# debug/release, unicode/ansi, universal/non-universal, and -# static/shared in the QtDialog or ccmake interfaces by turning ON/OFF -# the following variables: -# -# wxWidgets_USE_DEBUG -# wxWidgets_USE_UNICODE -# wxWidgets_USE_UNIVERSAL -# wxWidgets_USE_STATIC -# -# There is also a wxWidgets_CONFIG_OPTIONS variable for all other -# options that need to be passed to the wx-config utility. For -# example, to use the base toolkit found in the /usr/local path, set -# the variable (before calling the FIND_PACKAGE command) as such: -# -# set(wxWidgets_CONFIG_OPTIONS --toolkit=base --prefix=/usr) -# -# The following are set after the configuration is done for both -# windows and unix style: -# -# wxWidgets_FOUND - Set to TRUE if wxWidgets was found. -# wxWidgets_INCLUDE_DIRS - Include directories for WIN32 -# i.e., where to find "wx/wx.h" and -# "wx/setup.h"; possibly empty for unices. -# wxWidgets_LIBRARIES - Path to the wxWidgets libraries. -# wxWidgets_LIBRARY_DIRS - compile time link dirs, useful for -# rpath on UNIX. Typically an empty string -# in WIN32 environment. -# wxWidgets_DEFINITIONS - Contains defines required to compile/link -# against WX, e.g. WXUSINGDLL -# wxWidgets_DEFINITIONS_DEBUG- Contains defines required to compile/link -# against WX debug builds, e.g. __WXDEBUG__ -# wxWidgets_CXX_FLAGS - Include dirs and compiler flags for -# unices, empty on WIN32. Essentially -# "`wx-config --cxxflags`". -# wxWidgets_USE_FILE - Convenience include file. -# -# Sample usage: -# # Note that for MinGW users the order of libs is important! -# find_package(wxWidgets COMPONENTS net gl core base) -# if(wxWidgets_FOUND) -# include(${wxWidgets_USE_FILE}) -# # and for each of your dependent executable/library targets: -# target_link_libraries( ${wxWidgets_LIBRARIES}) -# endif() -# -# If wxWidgets is required (i.e., not an optional part): -# find_package(wxWidgets REQUIRED net gl core base) -# include(${wxWidgets_USE_FILE}) -# # and for each of your dependent executable/library targets: -# target_link_libraries( ${wxWidgets_LIBRARIES}) - -#============================================================================= -# Copyright 2004-2009 Kitware, Inc. -# Copyright 2007-2009 Miguel A. Figueroa-Villanueva -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# -# FIXME: check this and provide a correct sample usage... -# Remember to connect back to the upper text. -# Sample usage with monolithic wx build: -# -# find_package(wxWidgets COMPONENTS mono) -# ... - -# NOTES -# -# This module has been tested on the WIN32 platform with wxWidgets -# 2.6.2, 2.6.3, and 2.5.3. However, it has been designed to -# easily extend support to all possible builds, e.g., static/shared, -# debug/release, unicode, universal, multilib/monolithic, etc.. -# -# If you want to use the module and your build type is not supported -# out-of-the-box, please contact me to exchange information on how -# your system is setup and I'll try to add support for it. -# -# AUTHOR -# -# Miguel A. Figueroa-Villanueva (miguelf at ieee dot org). -# Jan Woetzel (jw at mip.informatik.uni-kiel.de). -# -# Based on previous works of: -# Jan Woetzel (FindwxWindows.cmake), -# Jorgen Bodde and Jerry Fath (FindwxWin.cmake). - -# TODO/ideas -# -# (1) Option/Setting to use all available wx libs -# In contrast to expert developer who lists the -# minimal set of required libs in wxWidgets_USE_LIBS -# there is the newbie user: -# - who just wants to link against WX with more 'magic' -# - doesn't know the internal structure of WX or how it was built, -# in particular if it is monolithic or not -# - want to link against all available WX libs -# Basically, the intent here is to mimic what wx-config would do by -# default (i.e., `wx-config --libs`). -# -# Possible solution: -# Add a reserved keyword "std" that initializes to what wx-config -# would default to. If the user has not set the wxWidgets_USE_LIBS, -# default to "std" instead of "base core" as it is now. To implement -# "std" will basically boil down to a FOR_EACH lib-FOUND, but maybe -# checking whether a minimal set was found. - - -# FIXME: This and all the DBG_MSG calls should be removed after the -# module stabilizes. -# -# Helper macro to control the debugging output globally. There are -# two versions for controlling how verbose your output should be. -macro(DBG_MSG _MSG) -# message(STATUS -# "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}") -endmacro() -macro(DBG_MSG_V _MSG) -# message(STATUS -# "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}") -endmacro() - -# Clear return values in case the module is loaded more than once. -set(wxWidgets_FOUND FALSE) -set(wxWidgets_INCLUDE_DIRS "") -set(wxWidgets_LIBRARIES "") -set(wxWidgets_LIBRARY_DIRS "") -set(wxWidgets_CXX_FLAGS "") - -# Using SYSTEM with INCLUDE_DIRECTORIES in conjunction with wxWidgets on -# the Mac produces compiler errors. Set wxWidgets_INCLUDE_DIRS_NO_SYSTEM -# to prevent UsewxWidgets.cmake from using SYSTEM. -# -# See cmake mailing list discussions for more info: -# http://www.cmake.org/pipermail/cmake/2008-April/021115.html -# http://www.cmake.org/pipermail/cmake/2008-April/021146.html -# -if(APPLE OR CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD") - set(wxWidgets_INCLUDE_DIRS_NO_SYSTEM 1) -endif() - -# DEPRECATED: This is a patch to support the DEPRECATED use of -# wxWidgets_USE_LIBS. -# -# If wxWidgets_USE_LIBS is set: -# - if using , then override wxWidgets_USE_LIBS -# - else set wxWidgets_FIND_COMPONENTS to wxWidgets_USE_LIBS -if(wxWidgets_USE_LIBS AND NOT wxWidgets_FIND_COMPONENTS) - set(wxWidgets_FIND_COMPONENTS ${wxWidgets_USE_LIBS}) -endif() -DBG_MSG("wxWidgets_FIND_COMPONENTS : ${wxWidgets_FIND_COMPONENTS}") - -# Add the convenience use file if available. -# -# Get dir of this file which may reside in: -# - CMAKE_MAKE_ROOT/Modules on CMake installation -# - CMAKE_MODULE_PATH if user prefers his own specialized version -set(wxWidgets_USE_FILE "") -get_filename_component( - wxWidgets_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) -# Prefer an existing customized version, but the user might override -# the FindwxWidgets module and not the UsewxWidgets one. -if(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") - set(wxWidgets_USE_FILE - "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") -else() - set(wxWidgets_USE_FILE UsewxWidgets) -endif() - -#===================================================================== -#===================================================================== -if(WIN32 AND NOT CYGWIN AND NOT MSYS) - set(wxWidgets_FIND_STYLE "win32") -else() - if(UNIX OR MSYS) - set(wxWidgets_FIND_STYLE "unix") - endif() -endif() - -#===================================================================== -# WIN32_FIND_STYLE -#===================================================================== -if(wxWidgets_FIND_STYLE STREQUAL "win32") - # Useful common wx libs needed by almost all components. - set(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat) - - # DEPRECATED: Use find_package(wxWidgets COMPONENTS mono) instead. - if(NOT wxWidgets_FIND_COMPONENTS) - if(wxWidgets_USE_MONOLITHIC) - set(wxWidgets_FIND_COMPONENTS mono) - else() - set(wxWidgets_FIND_COMPONENTS core base) # this is default - endif() - endif() - - # Add the common (usually required libs) unless - # wxWidgets_EXCLUDE_COMMON_LIBRARIES has been set. - if(NOT wxWidgets_EXCLUDE_COMMON_LIBRARIES) - list(APPEND wxWidgets_FIND_COMPONENTS - ${wxWidgets_COMMON_LIBRARIES}) - endif() - - #------------------------------------------------------------------- - # WIN32: Helper MACROS - #------------------------------------------------------------------- - # - # Get filename components for a configuration. For example, - # if _CONFIGURATION = mswunivud, then _UNV=univ, _UCD=u _DBG=d - # if _CONFIGURATION = mswu, then _UNV="", _UCD=u _DBG="" - # - macro(WX_GET_NAME_COMPONENTS _CONFIGURATION _UNV _UCD _DBG) - string(REGEX MATCH "univ" ${_UNV} "${_CONFIGURATION}") - string(REGEX REPLACE "msw.*(u)[d]*$" "u" ${_UCD} "${_CONFIGURATION}") - if(${_UCD} STREQUAL ${_CONFIGURATION}) - set(${_UCD} "") - endif() - string(REGEX MATCH "d$" ${_DBG} "${_CONFIGURATION}") - endmacro() - - # - # Find libraries associated to a configuration. - # - macro(WX_FIND_LIBS _UNV _UCD _DBG) - DBG_MSG_V("m_unv = ${_UNV}") - DBG_MSG_V("m_ucd = ${_UCD}") - DBG_MSG_V("m_dbg = ${_DBG}") - - # FIXME: What if both regex libs are available. regex should be - # found outside the loop and only wx${LIB}${_UCD}${_DBG}. - # Find wxWidgets common libraries. - foreach(LIB ${wxWidgets_COMMON_LIBRARIES} scintilla) - find_library(WX_${LIB}${_DBG} - NAMES - wx${LIB}${_UCD}${_DBG} # for regex - wx${LIB}${_DBG} - PATHS ${WX_LIB_DIR} - NO_DEFAULT_PATH - ) - mark_as_advanced(WX_${LIB}${_DBG}) - endforeach() - - # Find wxWidgets multilib base libraries. - find_library(WX_base${_DBG} - NAMES - wxbase29${_UCD}${_DBG} - wxbase28${_UCD}${_DBG} - wxbase27${_UCD}${_DBG} - wxbase26${_UCD}${_DBG} - wxbase25${_UCD}${_DBG} - PATHS ${WX_LIB_DIR} - NO_DEFAULT_PATH - ) - mark_as_advanced(WX_base${_DBG}) - foreach(LIB net odbc xml) - find_library(WX_${LIB}${_DBG} - NAMES - wxbase29${_UCD}${_DBG}_${LIB} - wxbase28${_UCD}${_DBG}_${LIB} - wxbase27${_UCD}${_DBG}_${LIB} - wxbase26${_UCD}${_DBG}_${LIB} - wxbase25${_UCD}${_DBG}_${LIB} - PATHS ${WX_LIB_DIR} - NO_DEFAULT_PATH - ) - mark_as_advanced(WX_${LIB}${_DBG}) - endforeach() - - # Find wxWidgets monolithic library. - find_library(WX_mono${_DBG} - NAMES - wxmsw${_UNV}29${_UCD}${_DBG} - wxmsw${_UNV}28${_UCD}${_DBG} - wxmsw${_UNV}27${_UCD}${_DBG} - wxmsw${_UNV}26${_UCD}${_DBG} - wxmsw${_UNV}25${_UCD}${_DBG} - PATHS ${WX_LIB_DIR} - NO_DEFAULT_PATH - ) - mark_as_advanced(WX_mono${_DBG}) - - # Find wxWidgets multilib libraries. - foreach(LIB core adv aui html media xrc dbgrid gl qa richtext - stc ribbon propgrid webview) - find_library(WX_${LIB}${_DBG} - NAMES - wxmsw${_UNV}29${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}28${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}27${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}26${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}25${_UCD}${_DBG}_${LIB} - PATHS ${WX_LIB_DIR} - NO_DEFAULT_PATH - ) - mark_as_advanced(WX_${LIB}${_DBG}) - endforeach() - endmacro() - - # - # Clear all library paths, so that FIND_LIBRARY refinds them. - # - # Clear a lib, reset its found flag, and mark as advanced. - macro(WX_CLEAR_LIB _LIB) - set(${_LIB} "${_LIB}-NOTFOUND" CACHE FILEPATH "Cleared." FORCE) - set(${_LIB}_FOUND FALSE) - mark_as_advanced(${_LIB}) - endmacro() - # Clear all debug or release library paths (arguments are "d" or ""). - macro(WX_CLEAR_ALL_LIBS _DBG) - # Clear wxWidgets common libraries. - foreach(LIB ${wxWidgets_COMMON_LIBRARIES} scintilla) - WX_CLEAR_LIB(WX_${LIB}${_DBG}) - endforeach() - - # Clear wxWidgets multilib base libraries. - WX_CLEAR_LIB(WX_base${_DBG}) - foreach(LIB net odbc xml) - WX_CLEAR_LIB(WX_${LIB}${_DBG}) - endforeach() - - # Clear wxWidgets monolithic library. - WX_CLEAR_LIB(WX_mono${_DBG}) - - # Clear wxWidgets multilib libraries. - foreach(LIB core adv aui html media xrc dbgrid gl qa richtext - stc ribbon propgrid) - WX_CLEAR_LIB(WX_${LIB}${_DBG}) - endforeach() - endmacro() - # Clear all wxWidgets debug libraries. - macro(WX_CLEAR_ALL_DBG_LIBS) - WX_CLEAR_ALL_LIBS("d") - endmacro() - # Clear all wxWidgets release libraries. - macro(WX_CLEAR_ALL_REL_LIBS) - WX_CLEAR_ALL_LIBS("") - endmacro() - - # - # Set the wxWidgets_LIBRARIES variable. - # Also, Sets output variable wxWidgets_FOUND to FALSE if it fails. - # - macro(WX_SET_LIBRARIES _LIBS _DBG) - DBG_MSG_V("Looking for ${${_LIBS}}") - if(WX_USE_REL_AND_DBG) - foreach(LIB ${${_LIBS}}) - DBG_MSG_V("Searching for ${LIB} and ${LIB}d") - DBG_MSG_V("WX_${LIB} : ${WX_${LIB}}") - DBG_MSG_V("WX_${LIB}d : ${WX_${LIB}d}") - if(WX_${LIB} AND WX_${LIB}d) - DBG_MSG_V("Found ${LIB} and ${LIB}d") - list(APPEND wxWidgets_LIBRARIES - debug ${WX_${LIB}d} optimized ${WX_${LIB}} - ) - else() - DBG_MSG_V("- not found due to missing WX_${LIB}=${WX_${LIB}} or WX_${LIB}d=${WX_${LIB}d}") - set(wxWidgets_FOUND FALSE) - endif() - endforeach() - else() - foreach(LIB ${${_LIBS}}) - DBG_MSG_V("Searching for ${LIB}${_DBG}") - DBG_MSG_V("WX_${LIB}${_DBG} : ${WX_${LIB}${_DBG}}") - if(WX_${LIB}${_DBG}) - DBG_MSG_V("Found ${LIB}${_DBG}") - list(APPEND wxWidgets_LIBRARIES ${WX_${LIB}${_DBG}}) - else() - DBG_MSG_V( - "- not found due to missing WX_${LIB}${_DBG}=${WX_${LIB}${_DBG}}") - set(wxWidgets_FOUND FALSE) - endif() - endforeach() - endif() - - DBG_MSG_V("OpenGL") - list(FIND ${_LIBS} gl WX_USE_GL) - if(NOT WX_USE_GL EQUAL -1) - DBG_MSG_V("- is required.") - list(APPEND wxWidgets_LIBRARIES opengl32 glu32) - endif() - - list(APPEND wxWidgets_LIBRARIES winmm comctl32 rpcrt4 wsock32) - endmacro() - - #------------------------------------------------------------------- - # WIN32: Start actual work. - #------------------------------------------------------------------- - - # Look for an installation tree. - find_path(wxWidgets_ROOT_DIR - NAMES include/wx/wx.h - PATHS - ENV wxWidgets_ROOT_DIR - ENV WXWIN - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWidgets_is1;Inno Setup: App Path]" # WX 2.6.x - C:/ - D:/ - ENV ProgramFiles - PATH_SUFFIXES - wxWidgets-2.9.4 - wxWidgets-2.9.3 - wxWidgets-2.9.2 - wxWidgets-2.9.1 - wxWidgets-2.9.0 - wxWidgets-2.8.9 - wxWidgets-2.8.8 - wxWidgets-2.8.7 - wxWidgets-2.8.6 - wxWidgets-2.8.5 - wxWidgets-2.8.4 - wxWidgets-2.8.3 - wxWidgets-2.8.2 - wxWidgets-2.8.1 - wxWidgets-2.8.0 - wxWidgets-2.7.4 - wxWidgets-2.7.3 - wxWidgets-2.7.2 - wxWidgets-2.7.1 - wxWidgets-2.7.0 - wxWidgets-2.7.0-1 - wxWidgets-2.6.4 - wxWidgets-2.6.3 - wxWidgets-2.6.2 - wxWidgets-2.6.1 - wxWidgets-2.5.4 - wxWidgets-2.5.3 - wxWidgets-2.5.2 - wxWidgets-2.5.1 - wxWidgets - DOC "wxWidgets base/installation directory?" - ) - - # If wxWidgets_ROOT_DIR changed, clear lib dir. - if(NOT WX_ROOT_DIR STREQUAL wxWidgets_ROOT_DIR) - set(WX_ROOT_DIR ${wxWidgets_ROOT_DIR} - CACHE INTERNAL "wxWidgets_ROOT_DIR") - set(wxWidgets_LIB_DIR "wxWidgets_LIB_DIR-NOTFOUND" - CACHE PATH "Cleared." FORCE) - endif() - - if(WX_ROOT_DIR) - # Select one default tree inside the already determined wx tree. - # Prefer static/shared order usually consistent with build - # settings. - if(MINGW) - set(WX_LIB_DIR_PREFIX gcc) - else() - set(WX_LIB_DIR_PREFIX vc) - endif() - if(BUILD_SHARED_LIBS) - find_path(wxWidgets_LIB_DIR - NAMES - msw/wx/setup.h - mswd/wx/setup.h - mswu/wx/setup.h - mswud/wx/setup.h - mswuniv/wx/setup.h - mswunivd/wx/setup.h - mswunivu/wx/setup.h - mswunivud/wx/setup.h - PATHS - ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll # prefer shared - ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib - DOC "Path to wxWidgets libraries?" - NO_DEFAULT_PATH - ) - else() - find_path(wxWidgets_LIB_DIR - NAMES - msw/wx/setup.h - mswd/wx/setup.h - mswu/wx/setup.h - mswud/wx/setup.h - mswuniv/wx/setup.h - mswunivd/wx/setup.h - mswunivu/wx/setup.h - mswunivud/wx/setup.h - PATHS - ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib # prefer static - ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll - DOC "Path to wxWidgets libraries?" - NO_DEFAULT_PATH - ) - endif() - - # If wxWidgets_LIB_DIR changed, clear all libraries. - if(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR) - set(WX_LIB_DIR ${wxWidgets_LIB_DIR} CACHE INTERNAL "wxWidgets_LIB_DIR") - WX_CLEAR_ALL_DBG_LIBS() - WX_CLEAR_ALL_REL_LIBS() - endif() - - if(WX_LIB_DIR) - # If building shared libs, define WXUSINGDLL to use dllimport. - if(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*") - set(wxWidgets_DEFINITIONS WXUSINGDLL) - DBG_MSG_V("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}") - endif() - - # Search for available configuration types. - foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw) - set(WX_${CFG}_FOUND FALSE) - if(EXISTS ${WX_LIB_DIR}/${CFG}) - list(APPEND WX_CONFIGURATION_LIST ${CFG}) - set(WX_${CFG}_FOUND TRUE) - set(WX_CONFIGURATION ${CFG}) - endif() - endforeach() - DBG_MSG_V("WX_CONFIGURATION_LIST=${WX_CONFIGURATION_LIST}") - - if(WX_CONFIGURATION) - set(wxWidgets_FOUND TRUE) - - # If the selected configuration wasn't found force the default - # one. Otherwise, use it but still force a refresh for - # updating the doc string with the current list of available - # configurations. - if(NOT WX_${wxWidgets_CONFIGURATION}_FOUND) - set(wxWidgets_CONFIGURATION ${WX_CONFIGURATION} CACHE STRING - "Set wxWidgets configuration (${WX_CONFIGURATION_LIST})" FORCE) - else() - set(wxWidgets_CONFIGURATION ${wxWidgets_CONFIGURATION} CACHE STRING - "Set wxWidgets configuration (${WX_CONFIGURATION_LIST})" FORCE) - endif() - - # If release config selected, and both release/debug exist. - if(WX_${wxWidgets_CONFIGURATION}d_FOUND) - option(wxWidgets_USE_REL_AND_DBG - "Use release and debug configurations?" TRUE) - set(WX_USE_REL_AND_DBG ${wxWidgets_USE_REL_AND_DBG}) - else() - # If the option exists (already in cache), force it false. - if(wxWidgets_USE_REL_AND_DBG) - set(wxWidgets_USE_REL_AND_DBG FALSE CACHE BOOL - "No ${wxWidgets_CONFIGURATION}d found." FORCE) - endif() - set(WX_USE_REL_AND_DBG FALSE) - endif() - - # Get configuration parameters from the name. - WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG) - - # Set wxWidgets lib setup include directory. - if(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) - set(wxWidgets_INCLUDE_DIRS - ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}) - else() - DBG_MSG("wxWidgets_FOUND FALSE because ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h does not exists.") - set(wxWidgets_FOUND FALSE) - endif() - - # Set wxWidgets main include directory. - if(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) - list(APPEND wxWidgets_INCLUDE_DIRS ${WX_ROOT_DIR}/include) - else() - DBG_MSG("wxWidgets_FOUND FALSE because WX_ROOT_DIR=${WX_ROOT_DIR} has no ${WX_ROOT_DIR}/include/wx/wx.h") - set(wxWidgets_FOUND FALSE) - endif() - - # Find wxWidgets libraries. - WX_FIND_LIBS("${UNV}" "${UCD}" "${DBG}") - if(WX_USE_REL_AND_DBG) - WX_FIND_LIBS("${UNV}" "${UCD}" "d") - endif() - - # Settings for requested libs (i.e., include dir, libraries, etc.). - WX_SET_LIBRARIES(wxWidgets_FIND_COMPONENTS "${DBG}") - - # Add necessary definitions for unicode builds - if("${UCD}" STREQUAL "u") - list(APPEND wxWidgets_DEFINITIONS UNICODE _UNICODE) - endif() - - # Add necessary definitions for debug builds - set(wxWidgets_DEFINITIONS_DEBUG _DEBUG __WXDEBUG__) - - endif() - endif() - endif() - -#===================================================================== -# UNIX_FIND_STYLE -#===================================================================== -else() - if(wxWidgets_FIND_STYLE STREQUAL "unix") - #----------------------------------------------------------------- - # UNIX: Helper MACROS - #----------------------------------------------------------------- - # - # Set the default values based on "wx-config --selected-config". - # - macro(WX_CONFIG_SELECT_GET_DEFAULT) - execute_process( - COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" - ${wxWidgets_CONFIG_OPTIONS} --selected-config - OUTPUT_VARIABLE _wx_selected_config - RESULT_VARIABLE _wx_result - ERROR_QUIET - ) - if(_wx_result EQUAL 0) - foreach(_opt_name debug static unicode universal) - string(TOUPPER ${_opt_name} _upper_opt_name) - if(_wx_selected_config MATCHES ".*${_opt_name}.*") - set(wxWidgets_DEFAULT_${_upper_opt_name} ON) - else() - set(wxWidgets_DEFAULT_${_upper_opt_name} OFF) - endif() - endforeach() - else() - foreach(_upper_opt_name DEBUG STATIC UNICODE UNIVERSAL) - set(wxWidgets_DEFAULT_${_upper_opt_name} OFF) - endforeach() - endif() - endmacro() - - # - # Query a boolean configuration option to determine if the system - # has both builds available. If so, provide the selection option - # to the user. - # - macro(WX_CONFIG_SELECT_QUERY_BOOL _OPT_NAME _OPT_HELP) - execute_process( - COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" - ${wxWidgets_CONFIG_OPTIONS} --${_OPT_NAME}=yes - RESULT_VARIABLE _wx_result_yes - OUTPUT_QUIET - ERROR_QUIET - ) - execute_process( - COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" - ${wxWidgets_CONFIG_OPTIONS} --${_OPT_NAME}=no - RESULT_VARIABLE _wx_result_no - OUTPUT_QUIET - ERROR_QUIET - ) - string(TOUPPER ${_OPT_NAME} _UPPER_OPT_NAME) - if(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0) - option(wxWidgets_USE_${_UPPER_OPT_NAME} - ${_OPT_HELP} ${wxWidgets_DEFAULT_${_UPPER_OPT_NAME}}) - else() - # If option exists (already in cache), force to available one. - if(DEFINED wxWidgets_USE_${_UPPER_OPT_NAME}) - if(_wx_result_yes EQUAL 0) - set(wxWidgets_USE_${_UPPER_OPT_NAME} ON CACHE BOOL ${_OPT_HELP} FORCE) - else() - set(wxWidgets_USE_${_UPPER_OPT_NAME} OFF CACHE BOOL ${_OPT_HELP} FORCE) - endif() - endif() - endif() - endmacro() - - # - # Set wxWidgets_SELECT_OPTIONS to wx-config options for selecting - # among multiple builds. - # - macro(WX_CONFIG_SELECT_SET_OPTIONS) - set(wxWidgets_SELECT_OPTIONS ${wxWidgets_CONFIG_OPTIONS}) - foreach(_opt_name debug static unicode universal) - string(TOUPPER ${_opt_name} _upper_opt_name) - if(DEFINED wxWidgets_USE_${_upper_opt_name}) - if(wxWidgets_USE_${_upper_opt_name}) - list(APPEND wxWidgets_SELECT_OPTIONS --${_opt_name}=yes) - else() - list(APPEND wxWidgets_SELECT_OPTIONS --${_opt_name}=no) - endif() - endif() - endforeach() - endmacro() - - #----------------------------------------------------------------- - # UNIX: Start actual work. - #----------------------------------------------------------------- - # Support cross-compiling, only search in the target platform. - find_program(wxWidgets_CONFIG_EXECUTABLE wx-config - ONLY_CMAKE_FIND_ROOT_PATH - ) - - if(wxWidgets_CONFIG_EXECUTABLE) - set(wxWidgets_FOUND TRUE) - - # get defaults based on "wx-config --selected-config" - WX_CONFIG_SELECT_GET_DEFAULT() - - # for each option: if both builds are available, provide option - WX_CONFIG_SELECT_QUERY_BOOL(debug "Use debug build?") - WX_CONFIG_SELECT_QUERY_BOOL(unicode "Use unicode build?") - WX_CONFIG_SELECT_QUERY_BOOL(universal "Use universal build?") - WX_CONFIG_SELECT_QUERY_BOOL(static "Link libraries statically?") - - # process selection to set wxWidgets_SELECT_OPTIONS - WX_CONFIG_SELECT_SET_OPTIONS() - DBG_MSG("wxWidgets_SELECT_OPTIONS=${wxWidgets_SELECT_OPTIONS}") - - # run the wx-config program to get cxxflags - execute_process( - COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" - ${wxWidgets_SELECT_OPTIONS} --cxxflags - OUTPUT_VARIABLE wxWidgets_CXX_FLAGS - RESULT_VARIABLE RET - ERROR_QUIET - ) - if(RET EQUAL 0) - string(STRIP "${wxWidgets_CXX_FLAGS}" wxWidgets_CXX_FLAGS) - separate_arguments(wxWidgets_CXX_FLAGS) - - DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}") - - # parse definitions from cxxflags; - # drop -D* from CXXFLAGS and the -D prefix - string(REGEX MATCHALL "^-D[^;]+" - wxWidgets_DEFINITIONS "${wxWidgets_CXX_FLAGS}") - string(REGEX REPLACE "^-D[^;]+(;|$)" "" - wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") - string(REGEX REPLACE ";$" "" - wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") - string(REPLACE "-D" "" - wxWidgets_DEFINITIONS "${wxWidgets_DEFINITIONS}") - - # parse include dirs from cxxflags; drop -I prefix - string(REGEX MATCHALL "-I[^;]+" - wxWidgets_INCLUDE_DIRS "${wxWidgets_CXX_FLAGS}") - string(REGEX REPLACE "-I[^;]+;" "" - wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") - string(REPLACE "-I" "" - wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}") - - DBG_MSG_V("wxWidgets_DEFINITIONS=${wxWidgets_DEFINITIONS}") - DBG_MSG_V("wxWidgets_INCLUDE_DIRS=${wxWidgets_INCLUDE_DIRS}") - DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}") - - else() - set(wxWidgets_FOUND FALSE) - DBG_MSG_V( - "${wxWidgets_CONFIG_EXECUTABLE} --cxxflags FAILED with RET=${RET}") - endif() - - # run the wx-config program to get the libs - # - NOTE: wx-config doesn't verify that the libs requested exist - # it just produces the names. Maybe a TRY_COMPILE would - # be useful here... - string(REPLACE ";" "," - wxWidgets_FIND_COMPONENTS "${wxWidgets_FIND_COMPONENTS}") - execute_process( - COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" - ${wxWidgets_SELECT_OPTIONS} --libs ${wxWidgets_FIND_COMPONENTS} - OUTPUT_VARIABLE wxWidgets_LIBRARIES - RESULT_VARIABLE RET - ERROR_QUIET - ) - if(RET EQUAL 0) - string(STRIP "${wxWidgets_LIBRARIES}" wxWidgets_LIBRARIES) - separate_arguments(wxWidgets_LIBRARIES) - string(REPLACE "-framework;" "-framework " - wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}") - string(REPLACE "-arch;" "-arch " - wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}") - string(REPLACE "-isysroot;" "-isysroot " - wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}") - - # extract linkdirs (-L) for rpath (i.e., LINK_DIRECTORIES) - string(REGEX MATCHALL "-L[^;]+" - wxWidgets_LIBRARY_DIRS "${wxWidgets_LIBRARIES}") - string(REPLACE "-L" "" - wxWidgets_LIBRARY_DIRS "${wxWidgets_LIBRARY_DIRS}") - - DBG_MSG_V("wxWidgets_LIBRARIES=${wxWidgets_LIBRARIES}") - DBG_MSG_V("wxWidgets_LIBRARY_DIRS=${wxWidgets_LIBRARY_DIRS}") - - else() - set(wxWidgets_FOUND FALSE) - DBG_MSG("${wxWidgets_CONFIG_EXECUTABLE} --libs ${wxWidgets_FIND_COMPONENTS} FAILED with RET=${RET}") - endif() - endif() - -#===================================================================== -# Neither UNIX_FIND_STYLE, nor WIN32_FIND_STYLE -#===================================================================== - else() - if(NOT wxWidgets_FIND_QUIETLY) - message(STATUS - "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): \n" - " Platform unknown/unsupported. It's neither WIN32 nor UNIX " - "find style." - ) - endif() - endif() -endif() - -# Debug output: -DBG_MSG("wxWidgets_FOUND : ${wxWidgets_FOUND}") -DBG_MSG("wxWidgets_INCLUDE_DIRS : ${wxWidgets_INCLUDE_DIRS}") -DBG_MSG("wxWidgets_LIBRARY_DIRS : ${wxWidgets_LIBRARY_DIRS}") -DBG_MSG("wxWidgets_LIBRARIES : ${wxWidgets_LIBRARIES}") -DBG_MSG("wxWidgets_CXX_FLAGS : ${wxWidgets_CXX_FLAGS}") -DBG_MSG("wxWidgets_USE_FILE : ${wxWidgets_USE_FILE}") - -#===================================================================== -#===================================================================== -#include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(wxWidgets DEFAULT_MSG wxWidgets_FOUND) -# Maintain consistency with all other variables. -set(wxWidgets_FOUND ${WXWIDGETS_FOUND}) - -#===================================================================== -# Macros for use in wxWidgets apps. -# - This module will not fail to find wxWidgets based on the code -# below. Hence, it's required to check for validity of: -# -# wxWidgets_wxrc_EXECUTABLE -#===================================================================== - -# Resource file compiler. -find_program(wxWidgets_wxrc_EXECUTABLE wxrc - ${wxWidgets_ROOT_DIR}/utils/wxrc/vc_msw - ) - -# -# WX_SPLIT_ARGUMENTS_ON( ...) -# -# Sets and to contain arguments to the left and right, -# respectively, of . -# -# Example usage: -# function(WXWIDGETS_ADD_RESOURCES outfiles) -# WX_SPLIT_ARGUMENTS_ON(OPTIONS wxrc_files wxrc_options ${ARGN}) -# ... -# endfunction() -# -# WXWIDGETS_ADD_RESOURCES(sources ${xrc_files} OPTIONS -e -o file.C) -# -# NOTE: This is a generic piece of code that should be renamed to -# SPLIT_ARGUMENTS_ON and put in a file serving the same purpose as -# FindPackageStandardArgs.cmake. At the time of this writing -# FindQt4.cmake has a QT4_EXTRACT_OPTIONS, which I basically copied -# here a bit more generalized. So, there are already two find modules -# using this approach. -# -function(WX_SPLIT_ARGUMENTS_ON _keyword _leftvar _rightvar) - # FIXME: Document that the input variables will be cleared. - #list(APPEND ${_leftvar} "") - #list(APPEND ${_rightvar} "") - set(${_leftvar} "") - set(${_rightvar} "") - - set(_doing_right FALSE) - foreach(element ${ARGN}) - if("${element}" STREQUAL "${_keyword}") - set(_doing_right TRUE) - else() - if(_doing_right) - list(APPEND ${_rightvar} "${element}") - else() - list(APPEND ${_leftvar} "${element}") - endif() - endif() - endforeach() - - set(${_leftvar} ${${_leftvar}} PARENT_SCOPE) - set(${_rightvar} ${${_rightvar}} PARENT_SCOPE) -endfunction() - -# -# WX_GET_DEPENDENCIES_FROM_XML( -# -# -# -# -# -# ) -# -# FIXME: Add documentation here... -# -function(WX_GET_DEPENDENCIES_FROM_XML - _depends - _match_patt - _clean_patt - _xml_contents - _depends_path - ) - - string(REGEX MATCHALL - ${_match_patt} - dep_file_list - "${${_xml_contents}}" - ) - foreach(dep_file ${dep_file_list}) - string(REGEX REPLACE ${_clean_patt} "" dep_file "${dep_file}") - - # make the file have an absolute path - if(NOT IS_ABSOLUTE "${dep_file}") - set(dep_file "${${_depends_path}}/${dep_file}") - endif() - - # append file to dependency list - list(APPEND ${_depends} "${dep_file}") - endforeach() - - set(${_depends} ${${_depends}} PARENT_SCOPE) -endfunction() - -# -# WXWIDGETS_ADD_RESOURCES( -# OPTIONS [NO_CPP_CODE]) -# -# Adds a custom command for resource file compilation of the -# and appends the output files to . -# -# Example usages: -# WXWIDGETS_ADD_RESOURCES(sources xrc/main_frame.xrc) -# WXWIDGETS_ADD_RESOURCES(sources ${xrc_files} OPTIONS -e -o altname.cxx) -# -function(WXWIDGETS_ADD_RESOURCES _outfiles) - WX_SPLIT_ARGUMENTS_ON(OPTIONS rc_file_list rc_options ${ARGN}) - - # Parse files for dependencies. - set(rc_file_list_abs "") - set(rc_depends "") - foreach(rc_file ${rc_file_list}) - get_filename_component(depends_path ${rc_file} PATH) - - get_filename_component(rc_file_abs ${rc_file} ABSOLUTE) - list(APPEND rc_file_list_abs "${rc_file_abs}") - - # All files have absolute paths or paths relative to the location - # of the rc file. - file(READ "${rc_file_abs}" rc_file_contents) - - # get bitmap/bitmap2 files - WX_GET_DEPENDENCIES_FROM_XML( - rc_depends - "]*>" - rc_file_contents - depends_path - ) - - # get url files - WX_GET_DEPENDENCIES_FROM_XML( - rc_depends - "]*>" - rc_file_contents - depends_path - ) - - # get wxIcon files - WX_GET_DEPENDENCIES_FROM_XML( - rc_depends - "]*class=\"wxIcon\"[^<]+" - "^]*>" - rc_file_contents - depends_path - ) - endforeach() - - # - # Parse options. - # - # If NO_CPP_CODE option specified, then produce .xrs file rather - # than a .cpp file (i.e., don't add the default --cpp-code option). - list(FIND rc_options NO_CPP_CODE index) - if(index EQUAL -1) - list(APPEND rc_options --cpp-code) - # wxrc's default output filename for cpp code. - set(outfile resource.cpp) - else() - list(REMOVE_AT rc_options ${index}) - # wxrc's default output filename for xrs file. - set(outfile resource.xrs) - endif() - - # Get output name for use in ADD_CUSTOM_COMMAND. - # - short option scanning - list(FIND rc_options -o index) - if(NOT index EQUAL -1) - math(EXPR filename_index "${index} + 1") - list(GET rc_options ${filename_index} outfile) - #list(REMOVE_AT rc_options ${index} ${filename_index}) - endif() - # - long option scanning - string(REGEX MATCH "--output=[^;]*" outfile_opt "${rc_options}") - if(outfile_opt) - string(REPLACE "--output=" "" outfile "${outfile_opt}") - endif() - #string(REGEX REPLACE "--output=[^;]*;?" "" rc_options "${rc_options}") - #string(REGEX REPLACE ";$" "" rc_options "${rc_options}") - - if(NOT IS_ABSOLUTE "${outfile}") - set(outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}") - endif() - add_custom_command( - OUTPUT "${outfile}" - COMMAND ${wxWidgets_wxrc_EXECUTABLE} ${rc_options} ${rc_file_list_abs} - DEPENDS ${rc_file_list_abs} ${rc_depends} - ) - - # Add generated header to output file list. - list(FIND rc_options -e short_index) - list(FIND rc_options --extra-cpp-code long_index) - if(NOT short_index EQUAL -1 OR NOT long_index EQUAL -1) - get_filename_component(outfile_ext ${outfile} EXT) - string(REPLACE "${outfile_ext}" ".h" outfile_header "${outfile}") - list(APPEND ${_outfiles} "${outfile_header}") - set_source_files_properties( - "${outfile_header}" PROPERTIES GENERATED TRUE - ) - endif() - - # Add generated file to output file list. - list(APPEND ${_outfiles} "${outfile}") - - set(${_outfiles} ${${_outfiles}} PARENT_SCOPE) -endfunction() diff --git a/src/build-system/cmake/unused/HunterGate.cmake b/src/build-system/cmake/unused/HunterGate.cmake deleted file mode 100644 index f41345b0a41..00000000000 --- a/src/build-system/cmake/unused/HunterGate.cmake +++ /dev/null @@ -1,529 +0,0 @@ -# Copyright (c) 2013-2017, Ruslan Baratov -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# This is a gate file to Hunter package manager. -# Include this file using `include` command and add package you need, example: -# -# cmake_minimum_required(VERSION 3.0) -# -# include("cmake/HunterGate.cmake") -# HunterGate( -# URL "https://github.com/path/to/hunter/archive.tar.gz" -# SHA1 "798501e983f14b28b10cda16afa4de69eee1da1d" -# ) -# -# project(MyProject) -# -# hunter_add_package(Foo) -# hunter_add_package(Boo COMPONENTS Bar Baz) -# -# Projects: -# * https://github.com/hunter-packages/gate/ -# * https://github.com/ruslo/hunter - -option(HUNTER_ENABLED "Enable Hunter package manager support" ON) -if(HUNTER_ENABLED) - if(CMAKE_VERSION VERSION_LESS "3.0") - message(FATAL_ERROR "At least CMake version 3.0 required for hunter dependency management." - " Update CMake or set HUNTER_ENABLED to OFF.") - endif() -endif() - -include(CMakeParseArguments) # cmake_parse_arguments - -option(HUNTER_STATUS_PRINT "Print working status" ON) -option(HUNTER_STATUS_DEBUG "Print a lot info" OFF) - -set(HUNTER_WIKI "https://github.com/ruslo/hunter/wiki") - -function(hunter_gate_status_print) - foreach(print_message ${ARGV}) - if(HUNTER_STATUS_PRINT OR HUNTER_STATUS_DEBUG) - message(STATUS "[hunter] ${print_message}") - endif() - endforeach() -endfunction() - -function(hunter_gate_status_debug) - foreach(print_message ${ARGV}) - if(HUNTER_STATUS_DEBUG) - string(TIMESTAMP timestamp) - message(STATUS "[hunter *** DEBUG *** ${timestamp}] ${print_message}") - endif() - endforeach() -endfunction() - -function(hunter_gate_wiki wiki_page) - message("------------------------------ WIKI -------------------------------") - message(" ${HUNTER_WIKI}/${wiki_page}") - message("-------------------------------------------------------------------") - message("") - message(FATAL_ERROR "") -endfunction() - -function(hunter_gate_internal_error) - message("") - foreach(print_message ${ARGV}) - message("[hunter ** INTERNAL **] ${print_message}") - endforeach() - message("[hunter ** INTERNAL **] [Directory:${CMAKE_CURRENT_LIST_DIR}]") - message("") - hunter_gate_wiki("error.internal") -endfunction() - -function(hunter_gate_fatal_error) - cmake_parse_arguments(hunter "" "WIKI" "" "${ARGV}") - string(COMPARE EQUAL "${hunter_WIKI}" "" have_no_wiki) - if(have_no_wiki) - hunter_gate_internal_error("Expected wiki") - endif() - message("") - foreach(x ${hunter_UNPARSED_ARGUMENTS}) - message("[hunter ** FATAL ERROR **] ${x}") - endforeach() - message("[hunter ** FATAL ERROR **] [Directory:${CMAKE_CURRENT_LIST_DIR}]") - message("") - hunter_gate_wiki("${hunter_WIKI}") -endfunction() - -function(hunter_gate_user_error) - hunter_gate_fatal_error(${ARGV} WIKI "error.incorrect.input.data") -endfunction() - -function(hunter_gate_self root version sha1 result) - string(COMPARE EQUAL "${root}" "" is_bad) - if(is_bad) - hunter_gate_internal_error("root is empty") - endif() - - string(COMPARE EQUAL "${version}" "" is_bad) - if(is_bad) - hunter_gate_internal_error("version is empty") - endif() - - string(COMPARE EQUAL "${sha1}" "" is_bad) - if(is_bad) - hunter_gate_internal_error("sha1 is empty") - endif() - - string(SUBSTRING "${sha1}" 0 7 archive_id) - - if(EXISTS "${root}/cmake/Hunter") - set(hunter_self "${root}") - else() - set( - hunter_self - "${root}/_Base/Download/Hunter/${version}/${archive_id}/Unpacked" - ) - endif() - - set("${result}" "${hunter_self}" PARENT_SCOPE) -endfunction() - -# Set HUNTER_GATE_ROOT cmake variable to suitable value. -function(hunter_gate_detect_root) - # Check CMake variable - string(COMPARE NOTEQUAL "${HUNTER_ROOT}" "" not_empty) - if(not_empty) - set(HUNTER_GATE_ROOT "${HUNTER_ROOT}" PARENT_SCOPE) - hunter_gate_status_debug("HUNTER_ROOT detected by cmake variable") - return() - endif() - - # Check environment variable - string(COMPARE NOTEQUAL "$ENV{HUNTER_ROOT}" "" not_empty) - if(not_empty) - set(HUNTER_GATE_ROOT "$ENV{HUNTER_ROOT}" PARENT_SCOPE) - hunter_gate_status_debug("HUNTER_ROOT detected by environment variable") - return() - endif() - - # Check HOME environment variable - string(COMPARE NOTEQUAL "$ENV{HOME}" "" result) - if(result) - set(HUNTER_GATE_ROOT "$ENV{HOME}/.hunter" PARENT_SCOPE) - hunter_gate_status_debug("HUNTER_ROOT set using HOME environment variable") - return() - endif() - - # Check SYSTEMDRIVE and USERPROFILE environment variable (windows only) - if(WIN32) - string(COMPARE NOTEQUAL "$ENV{SYSTEMDRIVE}" "" result) - if(result) - set(HUNTER_GATE_ROOT "$ENV{SYSTEMDRIVE}/.hunter" PARENT_SCOPE) - hunter_gate_status_debug( - "HUNTER_ROOT set using SYSTEMDRIVE environment variable" - ) - return() - endif() - - string(COMPARE NOTEQUAL "$ENV{USERPROFILE}" "" result) - if(result) - set(HUNTER_GATE_ROOT "$ENV{USERPROFILE}/.hunter" PARENT_SCOPE) - hunter_gate_status_debug( - "HUNTER_ROOT set using USERPROFILE environment variable" - ) - return() - endif() - endif() - - hunter_gate_fatal_error( - "Can't detect HUNTER_ROOT" - WIKI "error.detect.hunter.root" - ) -endfunction() - -macro(hunter_gate_lock dir) - if(NOT HUNTER_SKIP_LOCK) - if("${CMAKE_VERSION}" VERSION_LESS "3.2") - hunter_gate_fatal_error( - "Can't lock, upgrade to CMake 3.2 or use HUNTER_SKIP_LOCK" - WIKI "error.can.not.lock" - ) - endif() - hunter_gate_status_debug("Locking directory: ${dir}") - file(LOCK "${dir}" DIRECTORY GUARD FUNCTION) - hunter_gate_status_debug("Lock done") - endif() -endmacro() - -function(hunter_gate_download dir) - string( - COMPARE - NOTEQUAL - "$ENV{HUNTER_DISABLE_AUTOINSTALL}" - "" - disable_autoinstall - ) - if(disable_autoinstall AND NOT HUNTER_RUN_INSTALL) - hunter_gate_fatal_error( - "Hunter not found in '${dir}'" - "Set HUNTER_RUN_INSTALL=ON to auto-install it from '${HUNTER_GATE_URL}'" - "Settings:" - " HUNTER_ROOT: ${HUNTER_GATE_ROOT}" - " HUNTER_SHA1: ${HUNTER_GATE_SHA1}" - WIKI "error.run.install" - ) - endif() - string(COMPARE EQUAL "${dir}" "" is_bad) - if(is_bad) - hunter_gate_internal_error("Empty 'dir' argument") - endif() - - string(COMPARE EQUAL "${HUNTER_GATE_SHA1}" "" is_bad) - if(is_bad) - hunter_gate_internal_error("HUNTER_GATE_SHA1 empty") - endif() - - string(COMPARE EQUAL "${HUNTER_GATE_URL}" "" is_bad) - if(is_bad) - hunter_gate_internal_error("HUNTER_GATE_URL empty") - endif() - - set(done_location "${dir}/DONE") - set(sha1_location "${dir}/SHA1") - - set(build_dir "${dir}/Build") - set(cmakelists "${dir}/CMakeLists.txt") - - hunter_gate_lock("${dir}") - if(EXISTS "${done_location}") - # while waiting for lock other instance can do all the job - hunter_gate_status_debug("File '${done_location}' found, skip install") - return() - endif() - - file(REMOVE_RECURSE "${build_dir}") - file(REMOVE_RECURSE "${cmakelists}") - - file(MAKE_DIRECTORY "${build_dir}") # check directory permissions - - # Disabling languages speeds up a little bit, reduces noise in the output - # and avoids path too long windows error - file( - WRITE - "${cmakelists}" - "cmake_minimum_required(VERSION 3.0)\n" - "project(HunterDownload LANGUAGES NONE)\n" - "include(ExternalProject)\n" - "ExternalProject_Add(\n" - " Hunter\n" - " URL\n" - " \"${HUNTER_GATE_URL}\"\n" - " URL_HASH\n" - " SHA1=${HUNTER_GATE_SHA1}\n" - " DOWNLOAD_DIR\n" - " \"${dir}\"\n" - " SOURCE_DIR\n" - " \"${dir}/Unpacked\"\n" - " CONFIGURE_COMMAND\n" - " \"\"\n" - " BUILD_COMMAND\n" - " \"\"\n" - " INSTALL_COMMAND\n" - " \"\"\n" - ")\n" - ) - - if(HUNTER_STATUS_DEBUG) - set(logging_params "") - else() - set(logging_params OUTPUT_QUIET) - endif() - - hunter_gate_status_debug("Run generate") - - # Need to add toolchain file too. - # Otherwise on Visual Studio + MDD this will fail with error: - # "Could not find an appropriate version of the Windows 10 SDK installed on this machine" - if(EXISTS "${CMAKE_TOOLCHAIN_FILE}") - set(toolchain_arg "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}") - else() - # 'toolchain_arg' can't be empty - set(toolchain_arg "-DCMAKE_TOOLCHAIN_FILE=") - endif() - - string(COMPARE EQUAL "${CMAKE_MAKE_PROGRAM}" "" no_make) - if(no_make) - set(make_arg "") - else() - # Test case: remove Ninja from PATH but set it via CMAKE_MAKE_PROGRAM - set(make_arg "-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}") - endif() - - execute_process( - COMMAND - "${CMAKE_COMMAND}" - "-H${dir}" - "-B${build_dir}" - "-G${CMAKE_GENERATOR}" - "${toolchain_arg}" - ${make_arg} - WORKING_DIRECTORY "${dir}" - RESULT_VARIABLE download_result - ${logging_params} - ) - - if(NOT download_result EQUAL 0) - hunter_gate_internal_error("Configure project failed") - endif() - - hunter_gate_status_print( - "Initializing Hunter workspace (${HUNTER_GATE_SHA1})" - " ${HUNTER_GATE_URL}" - " -> ${dir}" - ) - execute_process( - COMMAND "${CMAKE_COMMAND}" --build "${build_dir}" - WORKING_DIRECTORY "${dir}" - RESULT_VARIABLE download_result - ${logging_params} - ) - - if(NOT download_result EQUAL 0) - hunter_gate_internal_error("Build project failed") - endif() - - file(REMOVE_RECURSE "${build_dir}") - file(REMOVE_RECURSE "${cmakelists}") - - file(WRITE "${sha1_location}" "${HUNTER_GATE_SHA1}") - file(WRITE "${done_location}" "DONE") - - hunter_gate_status_debug("Finished") -endfunction() - -# Must be a macro so master file 'cmake/Hunter' can -# apply all variables easily just by 'include' command -# (otherwise PARENT_SCOPE magic needed) -macro(HunterGate) - if(HUNTER_GATE_DONE) - # variable HUNTER_GATE_DONE set explicitly for external project - # (see `hunter_download`) - set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES) - endif() - - # First HunterGate command will init Hunter, others will be ignored - get_property(_hunter_gate_done GLOBAL PROPERTY HUNTER_GATE_DONE SET) - - if(NOT HUNTER_ENABLED) - # Empty function to avoid error "unknown function" - function(hunter_add_package) - endfunction() - elseif(_hunter_gate_done) - hunter_gate_status_debug("Secondary HunterGate (use old settings)") - hunter_gate_self( - "${HUNTER_CACHED_ROOT}" - "${HUNTER_VERSION}" - "${HUNTER_SHA1}" - _hunter_self - ) - include("${_hunter_self}/cmake/Hunter") - else() - set(HUNTER_GATE_LOCATION "${CMAKE_CURRENT_LIST_DIR}") - - string(COMPARE NOTEQUAL "${PROJECT_NAME}" "" _have_project_name) - if(_have_project_name) - hunter_gate_fatal_error( - "Please set HunterGate *before* 'project' command. " - "Detected project: ${PROJECT_NAME}" - WIKI "error.huntergate.before.project" - ) - endif() - - cmake_parse_arguments( - HUNTER_GATE "LOCAL" "URL;SHA1;GLOBAL;FILEPATH" "" ${ARGV} - ) - - string(COMPARE EQUAL "${HUNTER_GATE_SHA1}" "" _empty_sha1) - string(COMPARE EQUAL "${HUNTER_GATE_URL}" "" _empty_url) - string( - COMPARE - NOTEQUAL - "${HUNTER_GATE_UNPARSED_ARGUMENTS}" - "" - _have_unparsed - ) - string(COMPARE NOTEQUAL "${HUNTER_GATE_GLOBAL}" "" _have_global) - string(COMPARE NOTEQUAL "${HUNTER_GATE_FILEPATH}" "" _have_filepath) - - if(_have_unparsed) - hunter_gate_user_error( - "HunterGate unparsed arguments: ${HUNTER_GATE_UNPARSED_ARGUMENTS}" - ) - endif() - if(_empty_sha1) - hunter_gate_user_error("SHA1 suboption of HunterGate is mandatory") - endif() - if(_empty_url) - hunter_gate_user_error("URL suboption of HunterGate is mandatory") - endif() - if(_have_global) - if(HUNTER_GATE_LOCAL) - hunter_gate_user_error("Unexpected LOCAL (already has GLOBAL)") - endif() - if(_have_filepath) - hunter_gate_user_error("Unexpected FILEPATH (already has GLOBAL)") - endif() - endif() - if(HUNTER_GATE_LOCAL) - if(_have_global) - hunter_gate_user_error("Unexpected GLOBAL (already has LOCAL)") - endif() - if(_have_filepath) - hunter_gate_user_error("Unexpected FILEPATH (already has LOCAL)") - endif() - endif() - if(_have_filepath) - if(_have_global) - hunter_gate_user_error("Unexpected GLOBAL (already has FILEPATH)") - endif() - if(HUNTER_GATE_LOCAL) - hunter_gate_user_error("Unexpected LOCAL (already has FILEPATH)") - endif() - endif() - - hunter_gate_detect_root() # set HUNTER_GATE_ROOT - - # Beautify path, fix probable problems with windows path slashes - get_filename_component( - HUNTER_GATE_ROOT "${HUNTER_GATE_ROOT}" ABSOLUTE - ) - hunter_gate_status_debug("HUNTER_ROOT: ${HUNTER_GATE_ROOT}") - if(NOT HUNTER_ALLOW_SPACES_IN_PATH) - string(FIND "${HUNTER_GATE_ROOT}" " " _contain_spaces) - if(NOT _contain_spaces EQUAL -1) - hunter_gate_fatal_error( - "HUNTER_ROOT (${HUNTER_GATE_ROOT}) contains spaces." - "Set HUNTER_ALLOW_SPACES_IN_PATH=ON to skip this error" - "(Use at your own risk!)" - WIKI "error.spaces.in.hunter.root" - ) - endif() - endif() - - string( - REGEX - MATCH - "[0-9]+\\.[0-9]+\\.[0-9]+[-_a-z0-9]*" - HUNTER_GATE_VERSION - "${HUNTER_GATE_URL}" - ) - string(COMPARE EQUAL "${HUNTER_GATE_VERSION}" "" _is_empty) - if(_is_empty) - set(HUNTER_GATE_VERSION "unknown") - endif() - - hunter_gate_self( - "${HUNTER_GATE_ROOT}" - "${HUNTER_GATE_VERSION}" - "${HUNTER_GATE_SHA1}" - _hunter_self - ) - - set(_master_location "${_hunter_self}/cmake/Hunter") - if(EXISTS "${HUNTER_GATE_ROOT}/cmake/Hunter") - # Hunter downloaded manually (e.g. by 'git clone') - set(_unused "xxxxxxxxxx") - set(HUNTER_GATE_SHA1 "${_unused}") - set(HUNTER_GATE_VERSION "${_unused}") - else() - get_filename_component(_archive_id_location "${_hunter_self}/.." ABSOLUTE) - set(_done_location "${_archive_id_location}/DONE") - set(_sha1_location "${_archive_id_location}/SHA1") - - # Check Hunter already downloaded by HunterGate - if(NOT EXISTS "${_done_location}") - hunter_gate_download("${_archive_id_location}") - endif() - - if(NOT EXISTS "${_done_location}") - hunter_gate_internal_error("hunter_gate_download failed") - endif() - - if(NOT EXISTS "${_sha1_location}") - hunter_gate_internal_error("${_sha1_location} not found") - endif() - file(READ "${_sha1_location}" _sha1_value) - string(COMPARE EQUAL "${_sha1_value}" "${HUNTER_GATE_SHA1}" _is_equal) - if(NOT _is_equal) - hunter_gate_internal_error( - "Short SHA1 collision:" - " ${_sha1_value} (from ${_sha1_location})" - " ${HUNTER_GATE_SHA1} (HunterGate)" - ) - endif() - if(NOT EXISTS "${_master_location}") - hunter_gate_user_error( - "Master file not found:" - " ${_master_location}" - "try to update Hunter/HunterGate" - ) - endif() - endif() - include("${_master_location}") - set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES) - endif() -endmacro() - diff --git a/src/build-system/cmake/unused/NCBI-ToolkitConfig.cmake.in b/src/build-system/cmake/unused/NCBI-ToolkitConfig.cmake.in deleted file mode 100644 index c7ac59b7ac1..00000000000 --- a/src/build-system/cmake/unused/NCBI-ToolkitConfig.cmake.in +++ /dev/null @@ -1,141 +0,0 @@ -set(NCBI_CPP_TOOLKIT_VERSION_MAJOR @NCBI_CPP_TOOLKIT_VERSION_MAJOR@) -set(NCBI_CPP_TOOLKIT_VERSION_MINOR @NCBI_CPP_TOOLKIT_VERSION_MINOR@) -set(NCBI_CPP_TOOLKIT_VERSION_PATCH @NCBI_CPP_TOOLKIT_VERSION_PATCH@) -set(NCBI_CPP_TOOLKIT_PACKAGE_VERSION @NCBI_CPP_TOOLKIT_VERSION@) - - -@PACKAGE_INIT@ - -set_and_check(NCBI_CPP_TOOLKIT_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@PACKAGE_INCLUDE_INSTALL_DIRS@") -set_and_check(NCBI_CPP_TOOLKIT_SITE_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@PACKAGE_SITE_INCLUDE_INSTALL_DIRS@") -set_and_check(NCBI_CPP_TOOLKIT_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/@PACKAGE_LIBRARY_INSTALL_DIRS@") - -############################################################################## -# -# This is an exhaustive set of all definitions used in client CMakeLists.*.txt -# files. We enumerate everything here to allow the system to forward all -# definitions and make them available for any client code that would want to -# use it. -# -# This list is sorted / uniqed. Order is not relevant, so choose an order that -# begets an assurance of no duplication. -# -set(BAM_LIBS "@BAM_LIBS@") -set(BERKELEYDB_INCLUDE "@BERKELEYDB_INCLUDE@") -set(BERKELEYDB_LIBS "@BERKELEYDB_LIBS@") -set(BLAST_INPUT_LIBS "@BLAST_INPUT_LIBS@") -set(BLAST_LIBS "@BLAST_LIBS@") -set(BOOST_INCLUDE "@BOOST_INCLUDE@") -set(BOOST_iNCLUDE "@BOOST_iNCLUDE@") -set(BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@") -set(BZ2_INCLUDE "@BZ2_INCLUDE@") -set(BZ2_LIB "@BZ2_LIB@") -set(BZ2_LIBS "@BZ2_LIBS@") -set(CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@") -set(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@") -set(CMAKE_CXX_FLAGS "@CMAKE_CXX_FLAGS@") -set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@") -set(CMAKE_C_FLAGS "@CMAKE_C_FLAGS@") -set(CMPRS_INCLUDE "@CMPRS_INCLUDE@") -set(CMPRS_LIB "@CMPRS_LIB@") -set(COMPILE_DEFINITIONS "@COMPILE_DEFINITIONS@") -set(COMPRESS_LIBS "@COMPRESS_LIBS@") -set(CONNEXT_SRC_C "@CONNEXT_SRC_C@") -set(C_LIBS "@C_LIBS@") -set(DL_LIBS "@DL_LIBS@") -set(EUTILS_LIBS "@EUTILS_LIBS@") -set(FASTCGI_INCLUDE "@FASTCGI_INCLUDE@") -set(FASTCGI_LIBS "@FASTCGI_LIBS@") -set(FASTCGI_OBJS "@FASTCGI_OBJS@") -set(FTDS100_CTLIB_LIBS "@FTDS100_CTLIB_LIBS@") -set(FTDS100_INCLUDE "@FTDS100_INCLUDE@") -set(FTDS100_LIBS "@FTDS100_LIBS@") -set(FTDS_INCLUDE "@FTDS_INCLUDE@") -set(GIF_INCLUDE "@GIF_INCLUDE@") -set(GNUTLS_INCLUDE "@GNUTLS_INCLUDE@") -set(GNUTLS_LIBS "@GNUTLS_LIBS@") -set(HAVE_LIBUNWIND "@HAVE_LIBUNWIND@") -set(HAVE_LIBLMDB "@HAVE_LIBLMDB@") -set(IMAGE_LIBS "@IMAGE_LIBS@") -set(JPEG_INCLUDE "@JPEG_INCLUDE@") -set(KRB5_INCLUDE "@KRB5_INCLUDE@") -set(KRB5_LIBS "@KRB5_LIBS@") -set(KSTAT_LIBS "@KSTAT_LIBS@") -set(LAPACK_INCLUDE "@LAPACK_INCLUDE@") -set(LAPACK_LIBS "@LAPACK_LIBS@") -set(LIBS "@LIBS@") -set(LIBUNWIND_INCLUDE "@LIBUNWIND_INCLUDE@") -set(LIBUNWIND_LIBS "@LIBUNWIND_LIBS@") -set(LIBXML_INCLUDE "@LIBXML_INCLUDE@") -set(LIBXML_LIBS "@LIBXML_LIBS@") -set(LIBXSLT_INCLUDE "@LIBXSLT_INCLUDE@") -set(LIBXSLT_LIBS "@LIBXSLT_LIBS@") -set(LMDB_INCLUDE "@LMDB_INCLUDE@") -set(LMDB_LIBS "@LMDB_LIBS@") -set(LOCAL_LBSM "@LOCAL_LBSM@") -set(LZO_INCLUDE "@LZO_INCLUDE@") -set(LZO_LIB "@LZO_LIB@") -set(LZO_LIBS "@LZO_LIBS@") -set(MATH_LIBS "@MATH_LIBS@") -set(MYSQL_INCLUDE "@MYSQL_INCLUDE@") -set(MYSQL_LIBS "@MYSQL_LIBS@") -set(NCBI_CPP_TOOLKIT_VERSION "@NCBI_CPP_TOOLKIT_VERSION@") -set(NCBI_C_INCLUDE "@NCBI_C_INCLUDE@") -set(NCBI_C_LIBPATH "@NCBI_C_LIBPATH@") -set(NCBI_C_ncbi "@NCBI_C_ncbi@") -set(NCBI_TOOLS_ROOT "@NCBI_TOOLS_ROOT@") -set(NETWORK_LIBS "@NETWORK_LIBS@") -set(NETWORK_PURE_LIBS "@NETWORK_PURE_LIBS@") -set(OBJMGR_LIBS "@OBJMGR_LIBS@") -set(ODBC_FOUND "@ODBC_FOUND@") -set(ODBC_INCLUDE "@ODBC_INCLUDE@") -set(ODBC_LIBS "@ODBC_LIBS@") -set(PCRE_INCLUDE "@PCRE_INCLUDE@") -set(PCRE_LIBS "@PCRE_LIBS@") -set(PNG_INCLUDE "@PNG_INCLUDE@") -set(PYTHON_FOUND "@PYTHON_FOUND@") -set(PYTHON_INCLUDE "@PYTHON_INCLUDE@") -set(PYTHON_LIBS "@PYTHON_LIBS@") -set(RPCSVC_LIBS "@RPCSVC_LIBS@") -set(RT_LIBS "@RT_LIBS@") -set(RUNPATH_ORIGIN "@RUNPATH_ORIGIN@") -set(SAMTOOLS_INCLUDE "@SAMTOOLS_INCLUDE@") -set(SAMTOOLS_LIBS "@SAMTOOLS_LIBS@") -set(SDBAPI_LIB "@SDBAPI_LIB@") -set(SOBJMGR_LIBS "@SOBJMGR_LIBS@") -set(SQLITE3_INCLUDE "@SQLITE3_INCLUDE@") -set(SQLITE3_LIBS "@SQLITE3_LIBS@") -set(SRAREAD_LDEP "@SRAREAD_LDEP@") -set(SRA_INCLUDE "@SRA_INCLUDE@") -set(SYBASE_DBLIBS "@SYBASE_DBLIBS@") -set(SYBASE_DLLS "@SYBASE_DLLS@") -set(SYBASE_INCLUDE "@SYBASE_INCLUDE@") -set(SYBASE_LIBS "@SYBASE_LIBS@") -set(TIFF_INCLUDE "@TIFF_INCLUDE@") -set(WXWIDGETS_INCLUDE "@WXWIDGETS_INCLUDE@") -set(XCONNEXT "@XCONNEXT@") -set(XPM_INCLUDE "@XPM_INCLUDE@") -set(Z_INCLUDE "@Z_INCLUDE@") -set(Z_LIB "@Z_LIB@") -set(Z_LIBS "@Z_LIBS@") -set(wxWidgets_CXX_FLAGS "@wxWidgets_CXX_FLAGS@") -set(wxWidgets_FOUND "@wxWidgets_FOUND@") -set(wxWidgets_LIBRARIES "@wxWidgets_LIBRARIES@") -set(wxWidgets_LIBRARY_DIRS "@wxWidgets_LIBRARY_DIRS@") - - -############################################################################## -# -# Standard additions that are expected for all projects that import the C++ -# toolkit. -# - -include_directories(${NCBI_CPP_TOOLKIT_INCLUDE_DIRS} ${NCBI_CPP_TOOLKIT_SITE_INCLUDE_DIRS}) -link_directories(${NCBI_CPP_TOOLKIT_LIBRARY_DIRS}) - -add_definitions(@PACKAGE_COMPILE_DEFINITIONS@) - -include("${PACKAGE_PREFIX_DIR}/@PACKAGE_LIBRARY_INSTALL_DIRS@/cmake/ncbi-cpp-toolkit-${NCBI_CPP_TOOLKIT_PACKAGE_VERSION}/ncbi-cpp-toolkit.cmake") - -message(STATUS "Found NCBI C++ Toolkit, version ${NCBI_CPP_TOOLKIT_PACKAGE_VERSION}: ${PACKAGE_PREFIX_DIR}") - diff --git a/src/build-system/cmake/unused/Sqlite3Config.cmake b/src/build-system/cmake/unused/Sqlite3Config.cmake deleted file mode 100644 index 80e70fd8c4a..00000000000 --- a/src/build-system/cmake/unused/Sqlite3Config.cmake +++ /dev/null @@ -1,25 +0,0 @@ -# - find Sqlite 3 -# SQLITE3_INCLUDE_DIR - Where to find Sqlite 3 header files (directory) -# SQLITE3_LIBRARIES - Sqlite 3 libraries -# SQLITE3_LIBRARY_RELEASE - Where the release library is -# SQLITE3_LIBRARY_DEBUG - Where the debug library is -# SQLITE3_FOUND - Set to TRUE if we found everything (library, includes and executable) - -IF( SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY_RELEASE AND SQLITE3_LIBRARY_DEBUG ) - SET(SQLITE3_FIND_QUIETLY TRUE) -ENDIF( SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY_RELEASE AND SQLITE3_LIBRARY_DEBUG ) - -FIND_PATH( SQLITE3_INCLUDE_DIR sqlite3.h - PATHS /netopt/ncbi_tools/sqlite-3.6.14.2-ncbi1/include - NO_DEFAULT_PATH ) - -IF (SQLITE3_INCLUDE_DIR) - FIND_LIBRARY( SQLITE3_LIBRARY NAMES sqlite3 - PATHS /netopt/ncbi_tools/sqlite-3.6.14.2-ncbi1/lib/ - NO_DEFAULT_PATH ) - - IF (NOT SQLITE3_LIBRARY) - MESSAGE(FATAL_ERROR "Include ${SQLITE3_INCLUDE_DIR}/sqlite3.h found, but no library in /netopt/ncbi_tools/sqlite-3.6.14.2-ncbi1/GCC-Debug64MT/lib/ ") #XXX choose build type - ENDIF (NOT SQLITE3_LIBRARY) -ENDIF (SQLITE3_INCLUDE_DIR) - diff --git a/src/build-system/cmake/unused/cmake-configure b/src/build-system/cmake/unused/cmake-configure deleted file mode 100755 index e74864f8087..00000000000 --- a/src/build-system/cmake/unused/cmake-configure +++ /dev/null @@ -1,545 +0,0 @@ -#!/bin/sh - -# This script is based on "Autotools-style wrapper for CMake", -# Modifications made: -# 1. configuration parameters specific for C++ toolkit and Gpipe -# 2. --without- arguments support -# 3. custom root directory -# etc - -# Autotools-style (./configure) wrapper for CMake -# -# -# *** IMPORTANT *** -# -# You must include the GNUInstallDirs module (which comes with -# CMake) in your project. Just put "include (GNUInstallDirs)" in -# you CMakeLists.txt and you should be good. -# -# This script was originally written for Squash -# by Evan Nemerson -# , but has been spun off into a separate -# repository. Please feel free to copy it into your own repository, -# though I would appreciate it if you would post improvements, bugs, -# feature requests, etc. to the issue tracker at -# . -# -# To the extent possible under law, the author(s) hereby waive all -# copyright and related or neighboring rights to this work. For -# details, see - -TOP_SRCDIR="$(dirname $0)" - -if [ "${CMAKE_CMD}" = "" ]; then - CMAKE_CMD="cmake" -fi - -if [ -z "$CC" ]; then - CC=`which gcc` -fi -if [ -z "$CXX" ]; then - CXX=`which g++` -fi -BUILD_TYPE="Debug" -BUILD_SHARED_LIBS= # NOTE: By default, not set and neither ON nor OFF! -PREFIX=/usr/local -LIBDIR= -CMAKE_ARGS= -#CMAKE_ARGS=-DNCBI_EXPERIMENTAL=ON - -if [ -e "${TOP_SRCDIR}/configure-custom.sh" ]; then - . "${TOP_SRCDIR}/configure-custom.sh" -fi - -quote() { - echo "$1" | sed -e "s|'|'\\\\''|g; 1s/^/'/; \$s/\$/'/" -} - -extract_var_string() { - VAR_NAME=$1 - VAR_NAME=$(echo $1 | sed -e 's/[ \t]*$//') - if [ "x$2" != "x" ]; then - VAR_VALUE=$2 - else - VAR_VALUE=yes - fi - - if [ "x$3" != "x" ]; then - VAR_UC_NAME=$3 - else - VAR_UC_NAME=$(echo "$1" | tr '[:lower:]' '[:upper:]' | tr -c '[:alnum:]' '_' | sed 's/_$//g') - fi -} - -set_config_var() { - is_with=n - case "$1" in - "--enable-"*) - name="${1#--enable-}" - cfg="${ENABLE_VARS}" - ;; - "--disable-"*) - name="${1#--disable-}"; - cfg="${DISABLE_VARS}"; - ;; - "--with-"*) - # IFS="=" read -ra WITHARGS <<< "${1}" - name="${1#--with-}" - cfg="${WITH_VARS}" - is_with=y - ;; - "--without-"*) - # IFS="=" read -ra WITHARGS <<< "${1}" - name="${1#--without-}" - cfg="${WITH_VARS}" - is_without=y - ;; - esac - - found=n - for varstring in $cfg; do - extract_var_string $(echo "${varstring}" | tr '|' ' ') - if [ "x$VAR_NAME" = "x$name" ]; then - found=y - break; - fi - done - - if [ "$found" = "y" ]; then - if [ "x$is_without" = "xy" ]; then - CMAKE_ARGS="$CMAKE_ARGS -D${VAR_UC_NAME}_DISABLED=yes" - elif [ "x$is_with" = "xy" ]; then - CMAKE_ARGS="$CMAKE_ARGS -D${VAR_UC_NAME}=$(quote "$2")" - else - CMAKE_ARGS="$CMAKE_ARGS -D${VAR_UC_NAME}=$(quote "${VAR_VALUE}")" - fi - else - echo "Unknown parameter: ${1}" - exit 1 - fi -} - -prefix_to_offset() { - expr $(echo "${1}" | awk '{ print length }') + 1 -} - -print_help() { - cat < \"" - ;; - - "--enable-"*) - set_config_var "$1" - ;; - - "--disable-"*) - set_config_var "$1" - ;; - - "--with-"*) - name=$(echo "${1#--with-}" | awk '{split($1,v,"="); print v[1]}') - case "${1}" in - "--with-${name}="*) - set_config_var "--with-${name}" "${1#--with-${name}=}";; - "--with-${name}") - set_config_var "$1" "$2"; - shift;; - esac - ;; - - "--without-"*) - set_config_var "$1" - ;; - - *) - echo "$0: error: unrecognized option: \`$1'" >&2 - echo "Try \`$0 --help' for more information" >&2 - exit -1 - esac; - shift -done - -if [ "x${LIBDIR}" = "x" ]; then - LIBDIR="${PREFIX}/lib" -fi - -CMAKE_ARGS="$CMAKE_ARGS $DISTCC_OPTS" - -# Unlike CFLAGS/CXXFLAGS/CC/CXX, LDFLAGS isn't handled by CMake, so we -# need to parse it here. -if [ "x${LDFLAGS}" != "x" ]; then - for varname in EXE MODULE SHARED; do - CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_${varname}_LINKER_FLAGS=$(quote "$LDFLAGS")" - done -fi - -if [ -z "$ROOT" ]; then - if [ -z "$GPIPEROOT" ]; then - ROOT="CMake-$BUILD_TYPE" - case "$BUILD_SHARED_LIBS" in - ON) ROOT="$ROOT"DLL ;; - OFF) ROOT="$ROOT"Static ;; - esac - else - ROOT=`cd "${TOP_SRCDIR}/../../../" && /bin/pwd` || exit 1 - ROOT=`/usr/bin/dirname "$ROOT"` || exit 1 - ROOT=$ROOT/$GPIPEROOT - fi -fi - -if [ ! -z "$MAX_DEBUG" ]; then - CXXFLAGS="${CXXFLAGS:-}${CXXFLAGS:+ }-D_GLIBCXX_DEBUG" -fi - -if [ ! -z "$EXPERIMENTAL" ]; then - for x in `echo $EXPERIMENTAL | tr , ' '`; do - case "$x" in - ChaosMonkey ) - CPPFLAGS="$CPPFLAGS -DNCBI_MONKEY" - ;; - Int8GI ) - CPPFLAGS="$CPPFLAGS -DNCBI_INT8_GI" - NCBI_C_PATH_TAGS="/ncbi.gi64 .gi64" - ;; - StrictGI ) - CPPFLAGS="$CPPFLAGS -DNCBI_STRICT_GI" - NCBI_C_PATH_TAGS="/ncbi.gi64 .gi64" - ;; - * ) - echo "cmake-configure: error: unrecognized experimental feature \"$x\"." >&2 - exit 1;; - esac - done -fi - -CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_CXX_COMPILER=$(quote "$CXX")" -CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_C_COMPILER=$(quote "$CC")" -CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_C_FLAGS=$(quote "$CFLAGS")" -CXXFLAGS="${CXXFLAGS:-}${CXXFLAGS:+ }${CPPFLAGS:-}${CPPFLAGS:+ }" -CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_CXX_FLAGS=$(quote "$CXXFLAGS")" - -mkdir -p $ROOT/build -ROOT_SOURCE_PATH=`pwd` -cd $ROOT/build - -#we need to do this because CMake caches configuration parameters, and if you run ./cmake-configure for existing build directory -#but with another parameters, CMake will use old values for paramers you omit (not default ones) -if [ -e CMakeCache.txt ]; then - rm CMakeCache.txt -fi - -eval "${CMAKE_CMD}" ${TRACE_CMAKE} ${NINJA_FLAGS} "${TOP_SRCDIR}/../../" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_INSTALL_LIBDIR="${LIBDIR}" ${CMAKE_ARGS} diff --git a/src/build-system/cmake/unused/configure-custom.sh b/src/build-system/cmake/unused/configure-custom.sh deleted file mode 100755 index 56efb8f243a..00000000000 --- a/src/build-system/cmake/unused/configure-custom.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -WITH_VARS="libsxslt|DIR gnutls|DIR boost|DIR libxlsxwriter|DIR z|DIR bz2|dir lzo|DIR samtools|DIR glpk|DIR curl|dir sge|DIR -Python|DIR -opengl|DIR mesa|DIR glew|DIR odbc|DIR -mimetic|DIR gsoap|DIR Sybase|DIR" - -WITH_LIBXSLT_DOC="use libexslt installation in DIR" -WITH_GNUTLS_DOC="use GNUTLS installation in DIR" #- -WITH_BOOST_DOC="use Boost installation in DIR" -WITH_LIBXLSXWRITER_DOC="use libxlsxwriter installation in DIR" -WITH_Z_DOC="use zlib installation in DIR" #- -WITH_BZ2_DOC="use bzlib installation in DIR" #- -WITH_LZO_DOC="use LZO installation in DIR (requires 2.x or up)" #- -WITH_SAMTOOLS_DOC="use SAMtools installation in DIR" -WITH_GLPK_DOC="use GNU Linear Programming Kit installation in DIR" -WITH_CURL_DOC="use libcurl installation in DIR" #- -WITH_SGE_DOC="use Sun/Univa Grid Engine installation in DIR" -WITH_OPENGL_DOC="use OpenGL installation in DIR" -WITH_MESA_DOC="use MESA installation in DIR" -WITH_GLEW_DOC="use GLEW installation in DIR" - -WITH_MIMETIC_DOC="use libmimetic installation in DIR" -WITH_GSOAP_DOC="use gSOAP++ installation in DIR" - -#WITHOUT_VARS="libsxslt gnutls boost libxlsxwriter z bz2 lzo" -WITHOUT_LIBXSLT_DOC="don not use libxslt" -WITHOUT_BOOST_DOC="don not use Boost" -WITHOUT_LIBXLSXWRITER_DOC="don not use libxlsxwriter" -WITHOUT_Z_DOC="use internal copy of zlib" -WIHTOUT_BZ2_DOC="use internal copy of bzlib" -WIHTOUT_LZO_DOC="don not use LZO" -WITH_SAMTOOLS_DOC="do not use SAMtools" -WITHOUT_GLPK_DOC="do not use GNU Linear Programming Kit" -WIHTOUT_CURL_DOC="do not use libcurl" -WITHOUT_SGE_DOC="do not use Sun/Univa Grid Engine" -WITHOUT_OPENGL_DOC="do not use OpenGL" -WITHOUT_MESA_DOC="do not use MESA off-screen OpenGL" -WITHOUT_GLEW_DOC="do not use GLEW" - -WITHOUT_MIMETIC_DOC="do not use libmimetic" -WITHOUT_GSOAP_DOC="don not use gSOAP++" diff --git a/src/build-system/cmake/unused/generate_dependencies.sh b/src/build-system/cmake/unused/generate_dependencies.sh deleted file mode 100755 index fbafdb37724..00000000000 --- a/src/build-system/cmake/unused/generate_dependencies.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -set -e - -print_help() { - cat < [--patch-toolkit] [--with-ccache] [--with-distcc] [--j ] [--verbose] - - --bin Path to cmake_dependencies_generator binary - --patch-toolkit Patch CMake files in C++ toolkit too (by default only in ./internal/ subtree). - --with-ccache Use ccache if available - --with-distcc Use distcc if available - --j Compile in threads - --verbose Print names of processed files. -EOF -} - -ARGS="" -CMAKE_ARGS="" -MAKE_ARGS="" -CMAKE_DEPENDENCIES_GENERATOR="" - -while [ $# != 0 ]; do - case "$1" in - "--bin") - CMAKE_DEPENDENCIES_GENERATOR=`realpath $2` - shift - ;; - - "--patch-toolkit") - ARGS="${ARGS} -patch-toolkit";; - - "--with-ccache") - CMAKE_ARGS="$CMAKE_ARGS --with-ccache";; - - "--with-distcc") - CMAKE_ARGS="$CMAKE_ARGS --with-distcc";; - - "--verbose") - ARGS="${ARGS} --verbose";; - - "-j") - MAKE_ARGS="${MAKE_ARGS} -j $2" - shift - ;; - - "--help") - print_help;; - - "-h") - print_help;; - - *) - echo "$0: error: unrecognized option: \`$1'" >&2 - echo "" >&2 - print_help - exit -1 - - esac; - shift -done - -if [ -z "${CMAKE_DEPENDENCIES_GENERATOR}" ]; then - print_help - exit 1; -fi - - -./cmake-configure --fake-linking --with-build-root=CMake-CompilationOnly ${CMAKE_ARGS} -cd CMake-CompilationOnly/build -make ${MAKE_ARGS} -pwd -${CMAKE_DEPENDENCIES_GENERATOR} -od=.. -cd=../.. ${ARGS} diff --git a/src/build-system/cmake/unused/ncbi-defaults/ncbi-berkeleydb-config.cmake b/src/build-system/cmake/unused/ncbi-defaults/ncbi-berkeleydb-config.cmake deleted file mode 100644 index ce330ab599a..00000000000 --- a/src/build-system/cmake/unused/ncbi-defaults/ncbi-berkeleydb-config.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# Config file for NCBI-specific libxml layout -# - -############################################################################# -## -## Standard boilerplate capturing NCBI library layout issues -## - -if (BUILD_SHARED_LIBS) - set(_NCBI_LIBRARY_SUFFIX .so) -else() - set(_NCBI_LIBRARY_SUFFIX -static.a) -endif() - - -############################################################################# -## -## Module-specific checks -## - -set(_BDB_VERSION "BerkeleyDB-4.6.21.1") - -get_filename_component(BerkeleyDB_CMAKE_DIR "$ENV{NCBI}/${_BDB_VERSION}" REALPATH) -string(REGEX REPLACE ".*-([0-9].*)" "\\1" BerkeleyDB_VERSION_STRING "${BerkeleyDB_CMAKE_DIR}") - -set(BERKELEYDB_FOUND True) -set(BERKELEYDB_INCLUDE_DIR - ${BerkeleyDB_CMAKE_DIR}/include - ) - -# Choose the proper library path -# For some libraries, we look in /opt/ncbi/64 -set(_libpath ${BerkeleyDB_CMAKE_DIR}/${CMAKE_BUILD_TYPE}MT64) -if (CMAKE_BUILD_TYPE STREQUAL "Release" AND BUILD_SHARED_LIBS) - if (EXISTS /opt/ncbi/64/${_BDB_VERSION}/${CMAKE_BUILD_TYPE}MT64) - set(_libpath /opt/ncbi/64/${_BDB_VERSION}/${CMAKE_BUILD_TYPE}MT64) - endif() -endif() - -set(BERKELEYDB_LIBRARY ${_libpath}/libdb${_NCBI_LIBRARY_SUFFIX}) -set(BERKELEYDB_LIBRARIES ${BERKELEYDB_LIBRARY}) - -# These are for compatibility -# Some variants of CMake are case-sensitive when it comes to variables -set(BerkeleyDB_INCLUDE_DIR ${BERKELEYDB_INCLUDE_DIR}) -set(BerkeleyDB_LIBRARY ${BERKELEYDB_LIBRARY}) -set(BerkeleyDB_LIBRARIES ${BERKELEYDB_LIBRARIES}) -set(BerkeleyDB_FOUND ${BERKELEYDB_FOUND}) - -############################################################################# -## -## Logging -## - -if (_NCBI_MODULE_DEBUG) - message(STATUS "BerkeleyDB (NCBI): FOUND = ${BerkeleyDB_FOUND}") - message(STATUS "BerkeleyDB (NCBI): VERSION = ${BerkeleyDB_VERSION_STRING}") - message(STATUS "BerkeleyDB (NCBI): INCLUDE = ${BERKELEYDB_INCLUDE_DIR}") - message(STATUS "BerkeleyDB (NCBI): INCLUDE = ${BERKELEYDB_INCLUDE_DIR}") - message(STATUS "BerkeleyDB (NCBI): LIBRARIES = ${BERKELEYDB_LIBRARY}") -endif() - diff --git a/src/build-system/cmake/unused/ncbi-defaults/ncbi-ftgl-config.cmake b/src/build-system/cmake/unused/ncbi-defaults/ncbi-ftgl-config.cmake deleted file mode 100644 index 3becb37700e..00000000000 --- a/src/build-system/cmake/unused/ncbi-defaults/ncbi-ftgl-config.cmake +++ /dev/null @@ -1,53 +0,0 @@ -# Config file for NCBI-specific libxml layout -# - -############################################################################# -## -## Standard boilerplate capturing NCBI library layout issues -## - -if (BUILD_SHARED_LIBS) - set(_NCBI_LIBRARY_SUFFIX .so) -else() - set(_NCBI_LIBRARY_SUFFIX -static.a) -endif() - - -############################################################################# -## -## Module-specific checks -## - -set(_FTGL_VERSION "ftgl-2.1.3-rc5") - -get_filename_component(FTGL_CMAKE_DIR "$ENV{NCBI}/${_FTGL_VERSION}" REALPATH) -string(REGEX REPLACE ".*-([0-9].*)" "\\1" FTGL_VERSION_STRING "${FTGL_CMAKE_DIR}") - -set(FTGL_FOUND True) -set(FTGL_INCLUDE_DIR - ${FTGL_CMAKE_DIR}/include - ) - -# Choose the proper library path -# For some libraries, we look in /opt/ncbi/64 -set(_libpath ${FTGL_CMAKE_DIR}/${CMAKE_BUILD_TYPE}64/lib) -if (CMAKE_BUILD_TYPE STREQUAL "Release" AND BUILD_SHARED_LIBS) - if (EXISTS /opt/ncbi/64/${_FTGL_VERSION}/${CMAKE_BUILD_TYPE}64/lib) - set(_libpath /opt/ncbi/64/${_FTGL_VERSION}/${CMAKE_BUILD_TYPE}64/lib) - endif() -endif() - -set(FTGL_LIBRARIES ${_libpath}/libftgl${_NCBI_LIBRARY_SUFFIX}) - - -############################################################################# -## -## Logging -## - -if (_NCBI_MODULE_DEBUG) - message(STATUS "FTGL (NCBI): FOUND = ${FTGL_FOUND}") - message(STATUS "FTGL (NCBI): INCLUDE = ${FTGL_INCLUDE_DIR}") - message(STATUS "FTGL (NCBI): LIBRARIES = ${FTGL_LIBRARIES}") -endif() - diff --git a/src/build-system/cmake/unused/ncbi-defaults/ncbi-glew-config.cmake b/src/build-system/cmake/unused/ncbi-defaults/ncbi-glew-config.cmake deleted file mode 100644 index 74939cfb248..00000000000 --- a/src/build-system/cmake/unused/ncbi-defaults/ncbi-glew-config.cmake +++ /dev/null @@ -1,54 +0,0 @@ -# Config file for NCBI-specific libxml layout -# - -############################################################################# -## -## Standard boilerplate capturing NCBI library layout issues -## - -if (BUILD_SHARED_LIBS) - set(_NCBI_LIBRARY_SUFFIX .so) -else() - set(_NCBI_LIBRARY_SUFFIX -static.a) -endif() - - -############################################################################# -## -## Module-specific checks -## - -set(_GLEW_VERSION "glew-1.5.8") - -get_filename_component(GLEW_CMAKE_DIR "$ENV{NCBI}/glew-1.5.8" REALPATH) -string(REGEX REPLACE ".*-([0-9].*)" "\\1" GLEW_VERSION_STRING "${GLEW_CMAKE_DIR}") - -set(GLEW_FOUND True) -set(GLEW_INCLUDE_DIRS - ${GLEW_CMAKE_DIR}/include - ) - -# Choose the proper library path -# For some libraries, we look in /opt/ncbi/64 -set(_libpath ${GLEW_CMAKE_DIR}/${CMAKE_BUILD_TYPE}64/lib) -if (CMAKE_BUILD_TYPE STREQUAL "Release" AND BUILD_SHARED_LIBS) - if (EXISTS /opt/ncbi/64/${_GLEW_VERSION}/${CMAKE_BUILD_TYPE}64/lib) - set(_libpath /opt/ncbi/64/${_GLEW_VERSION}/${CMAKE_BUILD_TYPE}64/lib) - endif() -endif() - -set(GLEW_LIBRARIES ${_libpath}/libGLEW${_NCBI_LIBRARY_SUFFIX}) - - - -############################################################################# -## -## Logging -## - -if (_NCBI_MODULE_DEBUG) - message(STATUS "GLEW (NCBI): FOUND = ${GLEW_FOUND}") - message(STATUS "GLEW (NCBI): INCLUDE = ${GLEW_INCLUDE_DIRS}") - message(STATUS "GLEW (NCBI): LIBRARIES = ${GLEW_LIBRARIES}") -endif() - diff --git a/src/build-system/cmake/unused/ncbi-defaults/ncbi-gnutls-config.cmake b/src/build-system/cmake/unused/ncbi-defaults/ncbi-gnutls-config.cmake deleted file mode 100644 index fa0ff1dc58b..00000000000 --- a/src/build-system/cmake/unused/ncbi-defaults/ncbi-gnutls-config.cmake +++ /dev/null @@ -1,57 +0,0 @@ -# Config file for NCBI-specific libxml layout -# - -############################################################################# -## -## Standard boilerplate capturing NCBI library layout issues -## - -if (BUILD_SHARED_LIBS) - set(_NCBI_LIBRARY_SUFFIX .a) -else() - set(_NCBI_LIBRARY_SUFFIX -static.a) -endif() - - -############################################################################# -## -## Module-specific checks -## - -set(_GNUTLS_VERSION "gnutls-3.4.0") - -get_filename_component(GnuTLS_CMAKE_DIR "$ENV{NCBI}/${_GNUTLS_VERSION}" REALPATH) -string(REGEX REPLACE ".*-([0-9].*)" "\\1" GnuTLS_VERSION_STRING "${GnuTLS_CMAKE_DIR}") - -set(GNUTLS_FOUND True) -set(GNUTLS_INCLUDE_DIR - ${GnuTLS_CMAKE_DIR}/include - ) - -# Choose the proper library path -# For some libraries, we look in /opt/ncbi/64 -set(_libpath ${GnuTLS_CMAKE_DIR}/${CMAKE_BUILD_TYPE}MT64/lib) -if (CMAKE_BUILD_TYPE STREQUAL "Release" AND BUILD_SHARED_LIBS) - if (EXISTS /opt/ncbi/64/${_GNUTLS_VERSION}/${CMAKE_BUILD_TYPE}MT64/lib) - set(_libpath /opt/ncbi/64/${_GNUTLS_VERSION}/${CMAKE_BUILD_TYPE}MT64/lib) - endif() -endif() - -set(GNUTLS_LIBRARIES ${_libpath}/libgnutls${_NCBI_LIBRARY_SUFFIX}) - - -############################################################################# -## -## Logging -## - -set(GnuTLS_LIBRARIES ${GNUTLS_LIBRARIES}) - -if (_NCBI_MODULE_DEBUG) - message(STATUS "GnuTLS (NCBI): FOUND = ${GNUTLS_FOUND}") - message(STATUS "GnuTLS (NCBI): DIRECTORY = ${GnuTLS_CMAKE_DIR}") - message(STATUS "GnuTLS (NCBI): VERSION = ${GnuTLS_VERSION_STRING}") - message(STATUS "GnuTLS (NCBI): INCLUDE = ${GNUTLS_INCLUDE_DIR}") - message(STATUS "GnuTLS (NCBI): LIBRARIES = ${GNUTLS_LIBRARIES}") -endif() - diff --git a/src/build-system/cmake/unused/ncbi-defaults/ncbi-leveldb-config.cmake b/src/build-system/cmake/unused/ncbi-defaults/ncbi-leveldb-config.cmake deleted file mode 100644 index 6f23ccedf8b..00000000000 --- a/src/build-system/cmake/unused/ncbi-defaults/ncbi-leveldb-config.cmake +++ /dev/null @@ -1,65 +0,0 @@ -# Config file for NCBI-specific libxml layout -# - -############################################################################# -## -## Standard boilerplate capturing NCBI library layout issues -## - -if (BUILD_SHARED_LIBS) - set(_NCBI_LIBRARY_SUFFIX .a) - set(_NCBI_LIBRARY_STATIC ) -else() - set(_NCBI_LIBRARY_SUFFIX .a) - set(_NCBI_LIBRARY_STATIC ) -endif() - - -############################################################################# -## -## Module-specific checks -## - -set(_LEVELDB_VERSION "leveldb-1.21") - -get_filename_component(LEVELDB_CMAKE_DIR "$ENV{NCBI}/${_LEVELDB_VERSION}" REALPATH) -string(REGEX REPLACE ".*-([0-9].*)" "\\1" LEVELDB_VERSION_STRING "${LEVELDB_CMAKE_DIR}") - -set(LEVELDB_FOUND True) -set(LEVELDB_INCLUDE_DIR - ${LEVELDB_CMAKE_DIR}/include - ) - -# Choose the proper library path -# For some libraries, we look in /opt/ncbi/64 -set(_libpath_leveldb ${LEVELDB_CMAKE_DIR}) -if (CMAKE_BUILD_TYPE STREQUAL "Release" AND BUILD_SHARED_LIBS) - if (EXISTS /opt/ncbi/64/${_LEVELDB_VERSION}) - set(_libpath_leveldb /opt/ncbi/64/${_LEVELDB_VERSION}) - endif() -endif() - -if (EXISTS "${_libpath_leveldb}/${NCBI_COMPILER}${NCBI_COMPILER_VERSION}-${CMAKE_BUILD_TYPE}/lib") - set(_libpath_leveldb "${_libpath_leveldb}/${NCBI_COMPILER}${NCBI_COMPILER_VERSION}-${CMAKE_BUILD_TYPE}/lib") -else() - set(_libpath_leveldb "${_libpath_leveldb}/lib") -endif() - -set(LEVELDB_LIBRARIES - ${_libpath_leveldb}/libleveldb${_NCBI_LIBRARY_SUFFIX} - ) - -set(LEVELDB_INCLUDE_DIRS ${LEVELDB_INCLUDE_DIR}) - -############################################################################# -## -## Logging -## - -#if (_NCBI_MODULE_DEBUG) -if (True) - message(STATUS "LEVELDB (NCBI): FOUND = ${LEVELDB_FOUND}") - message(STATUS "LEVELDB (NCBI): INCLUDE = ${LEVELDB_INCLUDE_DIR}") - message(STATUS "LEVELDB (NCBI): LIBRARIES = ${LEVELDB_LIBRARIES}") -endif() - diff --git a/src/build-system/cmake/unused/ncbi-defaults/ncbi-libxml2-config.cmake b/src/build-system/cmake/unused/ncbi-defaults/ncbi-libxml2-config.cmake deleted file mode 100644 index 5fcd3ec6f3a..00000000000 --- a/src/build-system/cmake/unused/ncbi-defaults/ncbi-libxml2-config.cmake +++ /dev/null @@ -1,65 +0,0 @@ -# Config file for NCBI-specific libxml layout -# - -############################################################################# -## -## Standard boilerplate capturing NCBI library layout issues -## - -if (BUILD_SHARED_LIBS) - set(_NCBI_LIBRARY_SUFFIX .so) -else() - set(_NCBI_LIBRARY_SUFFIX -static.a) -endif() - - -############################################################################# -## -## Module-specific checks -## - -set(_LIBXML_VERSION "libxml-2.7.8") - -get_filename_component(LibXml2_CMAKE_DIR "$ENV{NCBI}/${_LIBXML_VERSION}" REALPATH) -string(REGEX REPLACE ".*-([0-9].*)" "\\1" LIBXML2_VERSION_STRING "${LibXml2_CMAKE_DIR}") - -set(LIBXML2_FOUND True) -set(LIBXML2_INCLUDE_DIR - ${LibXml2_CMAKE_DIR}/include/libxml2 - ) - - -# Choose the proper library path -# For some libraries, we look in /opt/ncbi/64 -set(_libpath ${LibXml2_CMAKE_DIR}/${CMAKE_BUILD_TYPE}MT64/lib) -if (CMAKE_BUILD_TYPE STREQUAL "Release" AND BUILD_SHARED_LIBS) - if (EXISTS /opt/ncbi/64/${_LIBXML_VERSION}/${CMAKE_BUILD_TYPE}MT64/lib) - set(_libpath /opt/ncbi/64/${_LIBXML_VERSION}/${CMAKE_BUILD_TYPE}MT64/lib) - endif() -endif() - -set(LIBXML2_LIBRARIES ${_libpath}/libxml2${_NCBI_LIBRARY_SUFFIX}) - - -set(LIBXML2_DEFINITIONS ) -set(LIBXML2_XMLLINT_EXECUTABLE - ${LibXml2_CMAKE_DIR}/${CMAKE_BUILD_TYPE}64MT/bin/xmllint - ) - -############################################################################# -## -## Logging -## - -set(LibXml2_VERSION_STRING ${LIBXML2_VERSION_STRING}) -set(LibXml2_LIBRARIES ${LIBXML2_LIBRARIES}) - -if (_NCBI_MODULE_DEBUG) - message(STATUS "LibXml2 (NCBI): FOUND = ${LIBXML2_FOUND}") - message(STATUS "LibXml2 (NCBI): INCLUDE = ${LIBXML2_INCLUDE_DIR}") - message(STATUS "LibXml2 (NCBI): LIBRARIES = ${LIBXML2_LIBRARIES}") - message(STATUS "LibXml2 (NCBI): DEFINITIONS = ${LIBXML2_DEFINITIONS}") - message(STATUS "LibXml2 (NCBI): XMLLINT = ${LIBXML2_XMLLINT_EXECUTABLE}") - message(STATUS "LibXml2 (NCBI): VERSION = ${LIBXML2_VERSION_STRING}") -endif() - diff --git a/src/build-system/cmake/unused/ncbi-defaults/ncbi-libxslt-config.cmake b/src/build-system/cmake/unused/ncbi-defaults/ncbi-libxslt-config.cmake deleted file mode 100644 index 480219edd8e..00000000000 --- a/src/build-system/cmake/unused/ncbi-defaults/ncbi-libxslt-config.cmake +++ /dev/null @@ -1,66 +0,0 @@ -# Config file for NCBI-specific libxml layout -# - -############################################################################# -## -## Standard boilerplate capturing NCBI library layout issues -## - -if (BUILD_SHARED_LIBS) - set(_NCBI_LIBRARY_SUFFIX .so) -else() - set(_NCBI_LIBRARY_SUFFIX -static.a) -endif() - - -############################################################################# -## -## Module-specific checks -## - -set(_LIBXSLT_VERSION "libxml-2.7.8") - -get_filename_component(LibXslt_CMAKE_DIR "$ENV{NCBI}/${_LIBXSLT_VERSION}" REALPATH) -string(REGEX REPLACE ".*-([0-9].*)" "\\1" LibXslt_VERSION_STRING "${LibXslt_CMAKE_DIR}") - -set(LIBXSLT_FOUND True) -set(LIBXSLT_INCLUDE_DIR - ${LibXslt_CMAKE_DIR}/include/libxslt - ) - -set(LIBXSLT_DEFINITIONS - ) -set(LIBXSLT_XSLTPROC_EXECUTABLE - ${LibXslt_CMAKE_DIR}/${CMAKE_BUILD_TYPE}64MT/bin/xsltproc - ) - -# Choose the proper library path -# For some libraries, we look in /opt/ncbi/64 -set(_libpath ${LibXslt_CMAKE_DIR}/${CMAKE_BUILD_TYPE}MT64/lib) -if (CMAKE_BUILD_TYPE STREQUAL "Release" AND BUILD_SHARED_LIBS) - if (EXISTS /opt/ncbi/64/${_LIBXSLT_VERSION}/${CMAKE_BUILD_TYPE}MT64/lib) - set(_libpath /opt/ncbi/64/${_LIBXSLT_VERSION}/${CMAKE_BUILD_TYPE}MT64/lib) - endif() -endif() - -set(LIBXSLT_LIBRARIES ${_libpath}/libxslt${_NCBI_LIBRARY_SUFFIX}) -set(LIBXSLT_EXSLT_LIBRARIES ${_libpath}/libexslt${_NCBI_LIBRARY_SUFFIX}) - - -############################################################################# -## -## Logging -## - -set(LIBXSLT_VERSION_STRING ${LibXslt_VERSION_STRING}) -set(LibXslt_LIBRARIES ${LIBXSLT_LIBRARIES}) - -if (_NCBI_MODULE_DEBUG) - message(STATUS "LibXslt (NCBI): FOUND = ${LIBXSLT_FOUND}") - message(STATUS "LibXslt (NCBI): INCLUDE = ${LIBXSLT_INCLUDE_DIR}") - message(STATUS "LibXslt (NCBI): LIBRARIES = ${LIBXSLT_LIBRARIES}") - message(STATUS "LibXslt (NCBI): DEFINITIONS = ${LIBXSLT_DEFINITIONS}") - message(STATUS "LibXslt (NCBI): XSLTPROC = ${LIBXSLT_XSLTPROC_EXECUTABLE}") - message(STATUS "LibXslt (NCBI): VERSION = ${LIBXSLT_VERSION_STRING}") -endif() - diff --git a/src/build-system/cmake/unused/ncbi-defaults/ncbi-lzo-config.cmake b/src/build-system/cmake/unused/ncbi-defaults/ncbi-lzo-config.cmake deleted file mode 100644 index b630ede73ea..00000000000 --- a/src/build-system/cmake/unused/ncbi-defaults/ncbi-lzo-config.cmake +++ /dev/null @@ -1,53 +0,0 @@ -# Config file for NCBI-specific libxml layout -# - -############################################################################# -## -## Standard boilerplate capturing NCBI library layout issues -## - -if (BUILD_SHARED_LIBS) - set(_NCBI_LIBRARY_SUFFIX -dll.so) -else() - set(_NCBI_LIBRARY_SUFFIX -static.a) -endif() - - -############################################################################# -## -## Module-specific checks -## - -set(_LZO_VERSION "lzo-2.05") - -get_filename_component(LZO_CMAKE_DIR "$ENV{NCBI}/${_LZO_VERSION}" REALPATH) -string(REGEX REPLACE ".*-([0-9].*)" "\\1" LZO_VERSION_STRING "${LZO_CMAKE_DIR}") - -set(LZO_FOUND True) -set(LZO_INCLUDE_DIR - ${LZO_CMAKE_DIR}/include - ) - -# Choose the proper library path -# For some libraries, we look in /opt/ncbi/64 -set(_libpath ${LZO_CMAKE_DIR}/lib) -if (CMAKE_BUILD_TYPE STREQUAL "Release" AND BUILD_SHARED_LIBS) - if (EXISTS /opt/ncbi/64/${_LZO_VERSION}/lib) - set(_libpath /opt/ncbi/64/${_LZO_VERSION}/lib) - endif() -endif() - -set(LZO_LIBRARIES ${_libpath}/liblzo2${_NCBI_LIBRARY_SUFFIX}) - - -############################################################################# -## -## Logging -## - -if (_NCBI_MODULE_DEBUG) - message(STATUS "LZO (NCBI): FOUND = ${LZO_FOUND}") - message(STATUS "LZO (NCBI): INCLUDE = ${LZO_INCLUDE_DIR}") - message(STATUS "LZO (NCBI): LIBRARIES = ${LZO_LIBRARIES}") -endif() - diff --git a/src/build-system/cmake/unused/ncbi-defaults/ncbi-mongocxx-config.cmake b/src/build-system/cmake/unused/ncbi-defaults/ncbi-mongocxx-config.cmake deleted file mode 100644 index 58f457577ea..00000000000 --- a/src/build-system/cmake/unused/ncbi-defaults/ncbi-mongocxx-config.cmake +++ /dev/null @@ -1,96 +0,0 @@ -# Config file for NCBI-specific libxml layout -# - -############################################################################# -## -## Standard boilerplate capturing NCBI library layout issues -## - -if (BUILD_SHARED_LIBS) - set(_NCBI_LIBRARY_SUFFIX .so) - set(_NCBI_LIBRARY_STATIC ) -else() - set(_NCBI_LIBRARY_SUFFIX .a) - set(_NCBI_LIBRARY_STATIC -static) -endif() - - -############################################################################# -## -## Module-specific checks -## - -set(_MONGODB_VERSION "mongodb-3.6.3") -set(_MONGO_C_DRIVER_VERSION "mongo-c-driver-1.17.5") - -get_filename_component(MONGOCXX_CMAKE_DIR "$ENV{NCBI}/${_MONGODB_VERSION}" REALPATH) -string(REGEX REPLACE ".*-([0-9].*)" "\\1" MONGOCXX_VERSION_STRING "${MONGOCXX_CMAKE_DIR}") - -get_filename_component(MONGO_C_DRIVER_CMAKE_DIR "$ENV{NCBI}/${_MONGO_C_DRIVER_VERSION}" REALPATH) -string(REGEX REPLACE ".*-([0-9].*)" "\\1" MONGO_C_DRIVER_VERSION_STRING "${MONGO_C_DRIVER_CMAKE_DIR}") - -set(MONGOCXX_FOUND True) -set(MONGOCXX_INCLUDE_DIR - ${MONGOCXX_CMAKE_DIR}/include/mongocxx/v_noabi - ) - -set(BSONCXX_FOUND True) -set(BSONCXX_INCLUDE_DIR - ${MONGOCXX_CMAKE_DIR}/include/bsoncxx/v_noabi - ) - -# Choose the proper library path -# For some libraries, we look in /opt/ncbi/64 -set(_libpath_mongocxx ${MONGOCXX_CMAKE_DIR}) -if (CMAKE_BUILD_TYPE STREQUAL "Release" AND BUILD_SHARED_LIBS) - if (EXISTS /opt/ncbi/64/${_MONGODB_VERSION}) - set(_libpath_mongocxx /opt/ncbi/64/${_MONGODB_VERSION}) - endif() -endif() - -set(_libpath_mongo_c_driver ${MONGO_C_DRIVER_CMAKE_DIR}/lib) -if (CMAKE_BUILD_TYPE STREQUAL "Release" AND BUILD_SHARED_LIBS) - if (EXISTS /opt/ncbi/64/${_MONGO_C_DRIVER_VERSION}/lib) - set(_libpath_mongo_c_driver /opt/ncbi/64/${_MONGO_C_DRIVER_VERSION}/lib) - endif() -endif() - -if (EXISTS "${_libpath_mongocxx}/${NCBI_COMPILER}${NCBI_COMPILER_VERSION}-${CMAKE_BUILD_TYPE}/lib") - set(_libpath_mongocxx "${_libpath_mongocxx}/${NCBI_COMPILER}${NCBI_COMPILER_VERSION}-${CMAKE_BUILD_TYPE}/lib") -else() - set(_libpath_mongocxx "${_libpath_mongocxx}/lib") -endif() - -set(MONGOCXX_LIBRARIES - ${_libpath_mongocxx}/libmongocxx${_NCBI_LIBRARY_SUFFIX} - ${_libpath_mongo_c_driver}/libmongoc${_NCBI_LIBRARY_STATIC}-1.0${_NCBI_LIBRARY_SUFFIX} - ) - -if (NOT BUILD_SHARED_LIBS) - set(MONGOCXX_LIBRARIES ${MONGOCXX_LIBRARIES} /lib64/libresolv-2.17.so) -endif() - - -set(BSONCXX_LIBRARIES - ${_libpath_mongocxx}/libbsoncxx${_NCBI_LIBRARY_SUFFIX} - ${_libpath_mongo_c_driver}/libbson${_NCBI_LIBRARY_STATIC}-1.0${_NCBI_LIBRARY_SUFFIX} - ) - -set(MONGOCXX_INCLUDE_DIRS ${MONGOCXX_INCLUDE_DIR}) -set(BSONCXX_INCLUDE_DIRS ${BSONCXX_INCLUDE_DIR}) - -############################################################################# -## -## Logging -## - -#if (_NCBI_MODULE_DEBUG) -if (True) - message(STATUS "MONGOCXX (NCBI): FOUND = ${MONGOCXX_FOUND}") - message(STATUS "MONGOCXX (NCBI): INCLUDE = ${MONGOCXX_INCLUDE_DIR}") - message(STATUS "MONGOCXX (NCBI): LIBRARIES = ${MONGOCXX_LIBRARIES}") - message(STATUS "BSONCXX (NCBI): FOUND = ${BSONCXX_FOUND}") - message(STATUS "BSONCXX (NCBI): INCLUDE = ${BSONCXX_INCLUDE_DIR}") - message(STATUS "BSONCXX (NCBI): LIBRARIES = ${BSONCXX_LIBRARIES}") -endif() - diff --git a/src/build-system/cmake/unused/ncbi-defaults/ncbi-opengl-config.cmake b/src/build-system/cmake/unused/ncbi-defaults/ncbi-opengl-config.cmake deleted file mode 100644 index 03f4e1959de..00000000000 --- a/src/build-system/cmake/unused/ncbi-defaults/ncbi-opengl-config.cmake +++ /dev/null @@ -1,63 +0,0 @@ -# Config file for NCBI-specific libxml layout -# - -############################################################################# -## -## Standard boilerplate capturing NCBI library layout issues -## - -if (BUILD_SHARED_LIBS) - set(_NCBI_LIBRARY_SUFFIX .so) -else() - set(_NCBI_LIBRARY_SUFFIX -static.a) -endif() - - -############################################################################# -## -## Module-specific checks -## - -set(_MESAGL_VERSION "Mesa-7.0.2-ncbi2") - -get_filename_component(OpenGL_CMAKE_DIR "$ENV{NCBI}/${_MESAGL_VERSION}" REALPATH) -string(REGEX REPLACE ".*-([0-9].*)" "\\1" OpenGL_VERSION_STRING "${OpenGL_CMAKE_DIR}") - -set(OPENGL_FOUND True) -set(OPENGL_GLU_FOUND True) -set(OPENGL_INCLUDE_DIR - ${OpenGL_CMAKE_DIR}/include - ) - -# Choose the proper library path -# For some libraries, we look in /opt/ncbi/64 -set(_libpath ${OpenGL_CMAKE_DIR}/lib) -if (CMAKE_BUILD_TYPE STREQUAL "Release" AND BUILD_SHARED_LIBS) - if (EXISTS /opt/ncbi/64/${_MESAGL_VERSION}/lib) - set(_libpath /opt/ncbi/64/${_MESAGL_VERSION}/lib) - endif() -endif() - - -set(OPENGL_glu_LIBRARIES ${_libpath}/libGLU${_NCBI_LIBRARY_SUFFIX}) -set(OPENGL_gl_LIBRARIES ${_libpath}/libGL${_NCBI_LIBRARY_SUFFIX}) -set(OPENGL_LIBRARIES - ${OPENGL_glu_LIBRARIES} - ${OPENGL_gl_LIBRARIES} - -lXmu -lXt -lXext -lSM -lICE -lX11 - ) - - -############################################################################# -## -## Logging -## - -set(OpenGL_LIBRARIES ${OPENGL_LIBRARIES}) - -if (_NCBI_MODULE_DEBUG) - message(STATUS "OpenGL (NCBI): FOUND = ${OPENGL_FOUND}") - message(STATUS "OpenGL (NCBI): INCLUDE = ${OPENGL_INCLUDE_DIR}") - message(STATUS "OpenGL (NCBI): LIBRARIES = ${OPENGL_LIBRARIES}") -endif() - diff --git a/src/build-system/cmake/unused/ncbi-defaults/ncbi-osmesa-config.cmake b/src/build-system/cmake/unused/ncbi-defaults/ncbi-osmesa-config.cmake deleted file mode 100644 index dd18135e65f..00000000000 --- a/src/build-system/cmake/unused/ncbi-defaults/ncbi-osmesa-config.cmake +++ /dev/null @@ -1,53 +0,0 @@ -# Config file for NCBI-specific libxml layout -# - -############################################################################# -## -## Standard boilerplate capturing NCBI library layout issues -## - -if (BUILD_SHARED_LIBS) - set(_NCBI_LIBRARY_SUFFIX .so) -else() - set(_NCBI_LIBRARY_SUFFIX -static.a) -endif() - - -############################################################################# -## -## Module-specific checks -## - -set(_MESAGL_VERSION "Mesa-7.0.2-ncbi2") - -get_filename_component(OSMesa_CMAKE_DIR "$ENV{NCBI}/${_MESAGL_VERSION}" REALPATH) -string(REGEX REPLACE ".*-([0-9].*)" "\\1" OSMesa_VERSION_STRING "${OSMesa_CMAKE_DIR}") - -set(OSMesa_FOUND True) -set(OSMesa_INCLUDE_DIR - ${OSMesa_CMAKE_DIR}/include - ) - -# Choose the proper library path -# For some libraries, we look in /opt/ncbi/64 -set(_libpath ${OSMesa_CMAKE_DIR}/lib) -if (CMAKE_BUILD_TYPE STREQUAL "Release" AND BUILD_SHARED_LIBS) - if (EXISTS /opt/ncbi/64/${_MESAGL_VERSION}/lib) - set(_libpath /opt/ncbi/64/${_MESAGL_VERSION}/lib) - endif() -endif() - -set(OSMesa_LIBRARIES ${_libpath}/libOSMesa${_NCBI_LIBRARY_SUFFIX}) - - -############################################################################# -## -## Logging -## - -if (_NCBI_MODULE_DEBUG) - message(STATUS "OSMesa (NCBI): FOUND = ${OSMesa_FOUND}") - message(STATUS "OSMesa (NCBI): INCLUDE = ${OSMesa_INCLUDE_DIR}") - message(STATUS "OSMesa (NCBI): LIBRARIES = ${OSMesa_LIBRARIES}") -endif() - diff --git a/src/build-system/cmake/unused/ncbi-defaults/ncbi-sqlite3-config.cmake b/src/build-system/cmake/unused/ncbi-defaults/ncbi-sqlite3-config.cmake deleted file mode 100644 index ba504ef4c76..00000000000 --- a/src/build-system/cmake/unused/ncbi-defaults/ncbi-sqlite3-config.cmake +++ /dev/null @@ -1,67 +0,0 @@ -# Config file for NCBI-specific libxml layout -# - -############################################################################# -## -## Standard boilerplate capturing NCBI library layout issues -## - -if (BUILD_SHARED_LIBS) - set(_NCBI_LIBRARY_SUFFIX .so) -else() - set(_NCBI_LIBRARY_SUFFIX -static.a) -endif() - - -############################################################################# -## -## Module-specific checks -## - -if (APPLE) - set(_SQLITE3_VERSION "sqlite-3.6.14.2-ncbi1") -else (APPLE) - set(_SQLITE3_VERSION "sqlite-3.7.13-ncbi1") -endif (APPLE) -set(_SQLITE3_VERSION "sqlite-3.26.0-ncbi1") - -get_filename_component(SQLITE3_CMAKE_DIR "$ENV{NCBI}/${_SQLITE3_VERSION}" REALPATH) -string(REGEX REPLACE ".*-([0-9].*)" "\\1" SQLITE3_VERSION_STRING "${SQLITE3_CMAKE_DIR}") - -set(SQLITE3_FOUND True) -set(SQLITE3_INCLUDE_DIR - ${SQLITE3_CMAKE_DIR}/include - ) - -# Choose the proper library path -# For some libraries, we look in /opt/ncbi/64 -set(_libpath ${SQLITE3_CMAKE_DIR}/${CMAKE_BUILD_TYPE}MT64/lib) -if (CMAKE_BUILD_TYPE STREQUAL "Release" AND BUILD_SHARED_LIBS) - if (EXISTS /opt/ncbi/64/${_SQLITE3_VERSION}/${CMAKE_BUILD_TYPE}MT64/lib) - set(_libpath /opt/ncbi/64/${_SQLITE3_VERSION}/${CMAKE_BUILD_TYPE}MT64/lib) - endif() -endif() - -set(SQLITE3_LIBRARY ${_libpath}/libsqlite3${_NCBI_LIBRARY_SUFFIX}) -set(SQLITE3_LIBRARIES ${SQLITE3_LIBRARY}) - - -# These are for compatibility with case-sensitive versions -set(Sqlite3_FOUND ${SQLITE3_FOUND}) -set(Sqlite3_INCLUDE_DIR ${SQLITE3_INCLUDE_DIR}) -set(Sqlite3_LIBRARY ${SQLITE3_LIBRARY}) -set(Sqlite3_LIBRARIES ${SQLITE3_LIBRARIES}) - - -############################################################################# -## -## Logging -## - -if (_NCBI_MODULE_DEBUG) - message(STATUS "SQLite3 (NCBI): FOUND = ${SQLITE3_FOUND}") - message(STATUS "SQLite3 (NCBI): VERSION = ${SQLITE3_VERSION_STRING}") - message(STATUS "SQLite3 (NCBI): INCLUDE = ${SQLITE3_INCLUDE_DIR}") - message(STATUS "SQLite3 (NCBI): LIBRARIES = ${SQLITE3_LIBRARY}") -endif() -