start populating the sub-dirs with the necessary cmake files.
This commit is contained in:
parent
f7ccf79fa8
commit
83984c1ef5
@ -1,24 +1,24 @@
|
||||
# - musrfit
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
|
||||
project(musrfit VERSION 1.3.0 LANGUAGES CXX)
|
||||
project(musrfit VERSION 1.3.0 LANGUAGES C CXX)
|
||||
|
||||
#--- musrfit specific options -------------------------------------------------------------------
|
||||
#--- musrfit specific options -------------------------------------------------
|
||||
option(nexus "build optional NeXus support. Needed for ISIS" OFF)
|
||||
option(ASlibs "build optional ASlibs" OFF)
|
||||
option(BMWlibs "build optional BMWlibs" OFF)
|
||||
option(BNMRlibs "build optional beta-NMR libs" OFF)
|
||||
option(qt_based_tools "try to install Qt based tools" ON)
|
||||
option(qt_based_tools "try to install Qt based tools (musredit, musrWiz, musrStep, mupp)" ON)
|
||||
|
||||
#--- check for all the needed packages ----------------------------------------------------------
|
||||
#--- check for all the needed packages ----------------------------------------
|
||||
|
||||
#--- add path to my own find modules and other stuff
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
|
||||
#--- check for git ------------------------------------------------------------------------------
|
||||
#--- check for git ------------------------------------------------------------
|
||||
find_package(Git REQUIRED)
|
||||
|
||||
#--- check for ROOT -----------------------------------------------------------------------------
|
||||
#--- check for ROOT -----------------------------------------------------------
|
||||
find_package(ROOT 6.06 REQUIRED COMPONENTS MathMore Minuit2 XMLParser)
|
||||
if (ROOT_mathmore_FOUND)
|
||||
execute_process(COMMAND root-config --bindir OUTPUT_VARIABLE ROOT_BINDIR)
|
||||
@ -26,24 +26,26 @@ if (ROOT_mathmore_FOUND)
|
||||
execute_process(COMMAND root-config --version OUTPUT_VARIABLE ROOT_VERSION)
|
||||
string(STRIP ${ROOT_VERSION} ROOT_VERSION)
|
||||
message("-- Found ROOT: ${ROOT_BINDIR} (found version: ${ROOT_VERSION})")
|
||||
#---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
|
||||
include(${ROOT_USE_FILE})
|
||||
endif (ROOT_mathmore_FOUND)
|
||||
|
||||
#--- check for boost ----------------------------------------------------------------------------
|
||||
#--- check for boost ----------------------------------------------------------
|
||||
find_package(Boost REQUIRED)
|
||||
|
||||
#--- check for gsl ------------------------------------------------------------------------------
|
||||
#--- check for gsl ------------------------------------------------------------
|
||||
find_package(GSL REQUIRED)
|
||||
|
||||
#--- check for fftw3 ----------------------------------------------------------------------------
|
||||
#--- check for fftw3 ----------------------------------------------------------
|
||||
find_package(FFTW3 REQUIRED)
|
||||
|
||||
#--- check for libxml2 --------------------------------------------------------------------------
|
||||
#--- check for libxml2 --------------------------------------------------------
|
||||
find_package(LibXml2 REQUIRED)
|
||||
|
||||
#--- check for OpenMP ---------------------------------------------------------------------------
|
||||
#--- check for OpenMP ---------------------------------------------------------
|
||||
find_package(OpenMP REQUIRED)
|
||||
|
||||
#--- check for Qt -------------------------------------------------------------------------------
|
||||
#--- check for Qt -------------------------------------------------------------
|
||||
if (qt_based_tools)
|
||||
# first try Qt5
|
||||
# Find the QtCore library
|
||||
@ -66,7 +68,7 @@ if (qt_based_tools)
|
||||
endif (NOT Qt5Core_FOUND)
|
||||
endif (qt_based_tools)
|
||||
|
||||
#--- if NeXus check also for HDF4, HDF5, and MXML -----------------------------------------------
|
||||
#--- if NeXus check also for HDF4, HDF5, and MXML -----------------------------
|
||||
if (nexus)
|
||||
find_package(HDF5 COMPONENTS CXX REQUIRED )
|
||||
#//as35 - STILL NEEDED?? -> find_package(HDF4 REQUIRED)
|
||||
@ -74,11 +76,11 @@ if (nexus)
|
||||
find_package(NeXus REQUIRED)
|
||||
endif (nexus)
|
||||
|
||||
#--- check for Cuba lib if BMWlibs are enabled --------------------------------------------------
|
||||
#--- check for Cuba lib if BMWlibs are enabled --------------------------------
|
||||
#//as35 probably always stick to the internal one ...
|
||||
|
||||
#[==[
|
||||
#--- propagate to the sub-directories -----------------------------------------
|
||||
add_subdirectory(src)
|
||||
#]==]
|
||||
|
||||
#--- write summary of the installation
|
||||
message("")
|
||||
@ -186,4 +188,4 @@ message("")
|
||||
message("-------------------------------------------------------------------------")
|
||||
message("")
|
||||
|
||||
#--- end ---
|
||||
#--- end ----------------------------------------------------------------------
|
||||
|
27
src/CMakeLists.txt
Normal file
27
src/CMakeLists.txt
Normal file
@ -0,0 +1,27 @@
|
||||
#--- add further sub-directories ----------------------------------------------
|
||||
#[==[
|
||||
add_subdirectory(classes)
|
||||
#]==]
|
||||
add_subdirectory(external)
|
||||
#[==[
|
||||
if (Qt5Core_FOUND OR Qt4_FOUND)
|
||||
add_subdirectory(musredit)
|
||||
endif (Qt5Core_FOUND OR Qt4_FOUND)
|
||||
if (QT_FOUND)
|
||||
add_subdirectory(musrgui)
|
||||
endif (QT_FOUND)
|
||||
#]==]
|
||||
|
||||
#--- define the musrfit libs --------------------------------------------------
|
||||
#[==[
|
||||
set(MUSRFIT_LIBS ${MUSRFIT_LIBS} mud)
|
||||
set(MUSRFIT_LIBS ${MUSRFIT_LIBS} TMusrRunHeader)
|
||||
set(MUSRFIT_LIBS ${MUSRFIT_LIBS} TLemRunHeader)
|
||||
set(MUSRFIT_LIBS ${MUSRFIT_LIBS} Class_MuSR_PSI)
|
||||
if (nexus)
|
||||
set(MUSRFIT_LIBS ${MUSRFIT_LIBS} ${LIBNEXUS_LIBRARY})
|
||||
set(MUSRFIT_LIBS ${MUSRFIT_LIBS} PNeXus)
|
||||
endif (nexus)
|
||||
set(MUSRFIT_LIBS ${MUSRFIT_LIBS} PMusr)
|
||||
#]==]
|
||||
|
28
src/external/CMakeLists.txt
vendored
Normal file
28
src/external/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
#[==[
|
||||
if (ASlibs)
|
||||
add_subdirectory(Nonlocal)
|
||||
add_subdirectory(MagProximity)
|
||||
add_subdirectory(libPhotoMeissner)
|
||||
add_subdirectory(libSpinValve)
|
||||
endif (ASlibs)
|
||||
|
||||
if (BMWlibs)
|
||||
add_subdirectory(libCuba)
|
||||
add_subdirectory(BMWtools)
|
||||
add_subdirectory(libCalcMeanFieldsLEM)
|
||||
add_subdirectory(libFitPofB)
|
||||
add_subdirectory(libGapIntegrals)
|
||||
add_subdirectory(libLFRelaxation)
|
||||
add_subdirectory(libZFRelaxation)
|
||||
endif (BMWlibs)
|
||||
#]==]
|
||||
|
||||
add_subdirectory(mud)
|
||||
add_subdirectory(MusrRoot)
|
||||
add_subdirectory(TLemRunHeader)
|
||||
add_subdirectory(MuSR_software)
|
||||
|
||||
if (nexus)
|
||||
add_subdirectory(nexus)
|
||||
endif (nexus)
|
||||
|
1
src/external/MuSR_software/CMakeLists.txt
vendored
Normal file
1
src/external/MuSR_software/CMakeLists.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
add_subdirectory(Class_MuSR_PSI)
|
25
src/external/MuSR_software/Class_MuSR_PSI/CMakeLists.txt
vendored
Normal file
25
src/external/MuSR_software/Class_MuSR_PSI/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
# - Class_MuSR_PSI library ----------------------------------------------------
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
set(exec_prefix "\$\{prefix\}")
|
||||
set(libdir "\$\{exec_prefix\}/lib")
|
||||
set(includedir "\$\{prefix\}/include")
|
||||
set(PSIBIN_VERSION "0.1.0")
|
||||
set(PSIBIN_LIBRARY_NAME "Class_MuSR_PSI")
|
||||
configure_file("Class_MuSR_PSI.pc.in" "Class_MuSR_PSI.pc" @ONLY)
|
||||
|
||||
#--- lib creation -------------------------------------------------------------
|
||||
add_library(Class_MuSR_PSI SHARED MuSR_td_PSI_bin.cpp)
|
||||
|
||||
#--- install Class_MuSR_PSI solib ---------------------------------------------
|
||||
install(TARGETS Class_MuSR_PSI DESTINATION lib)
|
||||
|
||||
#--- install MuSR_td_PSI_bin header -------------------------------------------
|
||||
install(FILES MuSR_td_PSI_bin.h DESTINATION include)
|
||||
|
||||
#--- install pkg-config info --------------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/Class_MuSR_PSI.pc
|
||||
DESTINATION lib/pkgconfig
|
||||
)
|
43
src/external/MusrRoot/CMakeLists.txt
vendored
Normal file
43
src/external/MusrRoot/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
# - TMusrRunHeader library ----------------------------------------------------
|
||||
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
root_generate_dictionary(
|
||||
TMusrRunHeaderDict TMusrRunHeader.h LINKDEF TMusrRunHeaderLinkDef.h
|
||||
)
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
set(exec_prefix "\$\{prefix\}")
|
||||
set(libdir "\$\{exec_prefix\}/lib")
|
||||
set(includedir "\$\{prefix\}/include")
|
||||
set(MUSR_ROOT_VERSION "1.0.0")
|
||||
set(MUSR_ROOT_LIBRARY_NAME "TMusrRunHeader")
|
||||
configure_file("TMusrRunHeader.pc.in" "TMusrRunHeader.pc" @ONLY)
|
||||
|
||||
#--- lib creation -------------------------------------------------------------
|
||||
add_library(TMusrRunHeader SHARED
|
||||
TMusrRunHeader.cpp
|
||||
TMusrRunHeaderDict.cxx
|
||||
)
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
target_link_libraries(TMusrRunHeader ${ROOT_LIBRARIES})
|
||||
|
||||
#--- install TMusrRunHeader solib ---------------------------------------------
|
||||
install(TARGETS TMusrRunHeader DESTINATION lib)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libTMusrRunHeaderDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTMusrRunHeaderDict.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
#--- install TMusrRunHeader header --------------------------------------------
|
||||
install(FILES TMusrRunHeader.h DESTINATION include)
|
||||
|
||||
#--- install pkg-config info --------------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/TMusrRunHeader.pc
|
||||
DESTINATION lib/pkgconfig
|
||||
)
|
48
src/external/TLemRunHeader/CMakeLists.txt
vendored
Normal file
48
src/external/TLemRunHeader/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
# -TLemRunHeader library ------------------------------------------------------
|
||||
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
root_generate_dictionary(
|
||||
TLemRunHeaderDict TLemRunHeader.h LINKDEF TLemRunHeaderLinkDef.h
|
||||
)
|
||||
root_generate_dictionary(
|
||||
TLemStatsDict TLemStats.h LINKDEF TLemStatsLinkDef.h
|
||||
)
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
set(exec_prefix "\$\{prefix\}")
|
||||
set(libdir "\$\{exec_prefix\}/lib")
|
||||
set(includedir "\$\{prefix\}/include")
|
||||
set(LEM_VERSION "1.5.0")
|
||||
set(LEM_LIBRARY_NAME "TLemRunHeader")
|
||||
configure_file("TLemRunHeader.pc.in" "TLemRunHeader.pc" @ONLY)
|
||||
|
||||
#--- lib creation -------------------------------------------------------------
|
||||
add_library(TLemRunHeader SHARED
|
||||
TLemRunHeader.cxx
|
||||
TLemRunHeaderDict.cxx
|
||||
TLemStats.cxx
|
||||
TLemStatsDict.cxx
|
||||
)
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
target_link_libraries(TLemRunHeader ${ROOT_LIBRARIES})
|
||||
|
||||
#--- install TLemRunHeader solib ----------------------------------------------
|
||||
install(TARGETS TLemRunHeader DESTINATION lib)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libTLemRunHeaderDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTLemRunHeaderDict.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
#--- install headers ----------------------------------------------------------
|
||||
install(FILES TLemRunHeader.h TLemStats.h DESTINATION include)
|
||||
|
||||
#--- install pkg-config info --------------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/TLemRunHeader.pc
|
||||
DESTINATION lib/pkgconfig
|
||||
)
|
1
src/external/mud/CMakeLists.txt
vendored
Normal file
1
src/external/mud/CMakeLists.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
add_subdirectory(src)
|
33
src/external/mud/src/CMakeLists.txt
vendored
Normal file
33
src/external/mud/src/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
# - mud library ---------------------------------------------------------------
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
set(exec_prefix "\$\{prefix\}")
|
||||
set(libdir "\$\{exec_prefix\}/lib")
|
||||
set(includedir "\$\{prefix\}/include")
|
||||
set(MUD_VERSION "1.0.0")
|
||||
set(MUD_LIBRARY_NAME "mud")
|
||||
configure_file("mud.pc.in" "mud.pc" @ONLY)
|
||||
|
||||
#--- lib creation -------------------------------------------------------------
|
||||
add_library(mud SHARED
|
||||
mud_all.c
|
||||
mud.c
|
||||
mud_encode.c
|
||||
mud_friendly.c
|
||||
mud_gen.c
|
||||
mud_new.c
|
||||
mud_tri_ti.c
|
||||
)
|
||||
|
||||
#--- install mud solib --------------------------------------------------------
|
||||
install(TARGETS mud DESTINATION lib)
|
||||
|
||||
#--- install mud header -------------------------------------------------------
|
||||
install(FILES mud.h DESTINATION include)
|
||||
|
||||
#--- install pkg-config info --------------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/mud.pc
|
||||
DESTINATION lib/pkgconfig
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user