@@ -2,85 +2,20 @@ cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
22# keep old policy for setting implicit link libraries
33# zlib causes issues in static builds otherwise
44cmake_policy (SET CMP0060 OLD)
5-
6- project (metabuli LANGUAGES C CXX)
5+ project (metabuli CXX)
76set (CMAKE_CXX_STANDARD 14)
7+ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR} /cmake" )
8+ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR} /lib/mmseqs/cmake" )
89
9- # Module paths
10- set (CMAKE_MODULE_PATH
11- ${CMAKE_MODULE_PATH}
12- "${CMAKE_CURRENT_SOURCE_DIR} /cmake"
13- "${CMAKE_CURRENT_SOURCE_DIR} /lib/mmseqs/cmake"
14- )
15-
16- # Default to Release
1710if (NOT CMAKE_BUILD_TYPE )
1811 set (CMAKE_BUILD_TYPE Release)
19- endif ()
12+ endif ()
2013
21- # MMseqs framework setup
2214set (FRAMEWORK_ONLY 1 CACHE INTERNAL "" FORCE)
2315include (MMseqsSetupDerivedTarget)
24-
25- # Third-party: libdeflate (with CMake)
26- add_subdirectory (lib/libdeflate)
27-
28- # Third-party: libisal (no CMakeLists, build manually)
29- # Collect all C/C++ sources, exclude architecture-specific files
30- file (GLOB_RECURSE ISAL_SRC_TMP
31- "${CMAKE_CURRENT_SOURCE_DIR} /lib/libisal/*.c"
32- "${CMAKE_CURRENT_SOURCE_DIR} /lib/libisal/*.cc"
33- )
34- # Filter out architecture-specific sources (e.g., aarch64, ppc64le)
35- set (ISAL_SRC "" )
36- foreach (_src IN LISTS ISAL_SRC_TMP)
37- if (NOT _src MATCHES ".*(aarch64|ppc64le|vsx|riscv|tests|examples).*" )
38- list (APPEND ISAL_SRC ${_src} )
39- endif ()
40- endforeach ()
41- if (NOT ISAL_SRC)
42- message (FATAL_ERROR "No libisal sources found (after filtering) in lib/libisal/src" )
43- endif ()
44- add_library (isal STATIC ${ISAL_SRC} )
45- target_include_directories (isal PUBLIC
46- "${CMAKE_CURRENT_SOURCE_DIR} /lib/libisal/include"
47- "${CMAKE_CURRENT_SOURCE_DIR} /lib/libisal"
48- )
49-
50-
51-
52-
53- # fastp: no CMakeLists, build manually as static library
54- file (GLOB_RECURSE FASTP_SRC
55- "${CMAKE_CURRENT_SOURCE_DIR} /lib/fastp/*.cpp"
56- "${CMAKE_CURRENT_SOURCE_DIR} /lib/fastp/*.c"
57- )
58- if (NOT FASTP_SRC)
59- message (FATAL_ERROR "No fastp sources found in lib/fastp/src" )
60- endif ()
61- add_library (fastp STATIC ${FASTP_SRC} )
62- target_include_directories (fastp PUBLIC
63- "${CMAKE_CURRENT_SOURCE_DIR} /lib/fastp"
64- )
65-
66- # Link deflate and isal to fastp
67- target_link_libraries (fastp PUBLIC deflate isal)
68-
69-
7016add_subdirectory (lib/mmseqs)
7117add_subdirectory (lib/prodigal)
72-
7318add_subdirectory (src)
7419add_subdirectory (data)
75-
7620include_directories (lib)
77- # # Include top-level lib headers for all targets
78- # include_directories(
79- # "${CMAKE_CURRENT_SOURCE_DIR}/lib/libdeflate/include"
80- # "${CMAKE_CURRENT_SOURCE_DIR}/lib/libisal/include"
81- # "${CMAKE_CURRENT_SOURCE_DIR}/lib/libfastp/include"
82- # "${CMAKE_CURRENT_SOURCE_DIR}/lib"
83- # )
84-
85-
8621
0 commit comments