Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ include(fetch_sqlite3)
include(fetch_fftw3)
include(fetch_libtiff)
include(fetch_libjpeg)
include(fetch_libsvm)

fetch_hdf5()
fetch_sqlite3()
fetch_fftw3()
fetch_libtiff()
fetch_libjpeg()
fetch_libsvm()

if(SKBUILD_PLATLIB_DIR)
set(PYTHON_INSTALL_DIR "${SKBUILD_PLATLIB_DIR}")
Expand Down Expand Up @@ -77,13 +79,16 @@ file(
list(
APPEND
SOURCES
${XMIPP3_LIBRARY_DIR}/classification/svm_classifier.cpp
${XMIPP3_LIBRARY_DIR}/reconstruction/ctf_enhance_psd.cpp
${XMIPP3_LIBRARY_DIR}/reconstruction/ctf_estimate_from_micrograph.cpp
${XMIPP3_LIBRARY_DIR}/reconstruction/ctf_estimate_from_psd_base.cpp
${XMIPP3_LIBRARY_DIR}/reconstruction/ctf_estimate_from_psd.cpp
${XMIPP3_LIBRARY_DIR}/reconstruction/ctf_estimate_from_psd_fast.cpp
${XMIPP3_LIBRARY_DIR}/reconstruction/ctf_estimate_psd_with_arma.cpp
${XMIPP3_LIBRARY_DIR}/reconstruction/fringe_processing.cpp
${XMIPP3_LIBRARY_DIR}/reconstruction/image_rotational_pca.cpp
${XMIPP3_LIBRARY_DIR}/reconstruction/micrograph_automatic_picking2.cpp
${XMIPP3_LIBRARY_DIR}/reconstruction/psd_estimator.cpp
${XMIPP3_LIBRARY_DIR}/data/basic_pca.cpp
${XMIPP3_LIBRARY_DIR}/data/basis.cpp
Expand All @@ -98,6 +103,7 @@ list(
${XMIPP3_LIBRARY_DIR}/data/grids.cpp
${XMIPP3_LIBRARY_DIR}/data/integration.cpp
${XMIPP3_LIBRARY_DIR}/data/mask.cpp
${XMIPP3_LIBRARY_DIR}/data/micrograph.cpp
${XMIPP3_LIBRARY_DIR}/data/morphology.cpp
${XMIPP3_LIBRARY_DIR}/data/normalize.cpp
${XMIPP3_LIBRARY_DIR}/data/numerical_tools.cpp
Expand All @@ -118,6 +124,7 @@ target_link_libraries(
Python::Module
Python::NumPy
sqlite3
libsvm
HDF5::CXX
HDF5::HDF5
FFTW3::Double
Expand Down
36 changes: 36 additions & 0 deletions cmake/modules/fetch_libsvm.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#***************************************************************************
# Authors: Oier Lauzirika Zarrabeitia (oierlauzi@bizkaia.eu)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307 USA
#
# All comments concerning this program package may be sent to the
# e-mail address 'xmipp@cnb.csic.es'
# ***************************************************************************

include(ExternalProject)

function(fetch_libsvm)
cmake_policy(SET CMP0135 NEW) # To avoid warnings
FetchContent_Declare(
libsvm
URL https://github.com/cossorzano/libsvm/archive/refs/heads/master.tar.gz
)
FetchContent_MakeAvailable(libsvm)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_library(libsvm STATIC ${libsvm_SOURCE_DIR}/svm.cpp)
target_include_directories(libsvm PUBLIC ${libsvm_SOURCE_DIR})
endfunction()
Loading
Loading