diff --git a/CMakeLists.txt b/CMakeLists.txt index e72365d..2013993 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,9 @@ endif() set(CMAKE_EXPORT_COMPILE_COMMANDS ON) if(AARE_FETCH_ZMQ) + # Fetchcontent_Declare is deprecated need to find a way to update this + # for now setting the policy to old is enough + cmake_policy(SET CMP0169 OLD) FetchContent_Declare( libzmq GIT_REPOSITORY https://github.com/zeromq/libzmq.git @@ -98,9 +101,16 @@ else() find_package(fmt 6 REQUIRED) endif() -#TODO! Add options for nlohmann_json as well -find_package(nlohmann_json 3.11.3 REQUIRED) +if (AARE_FETCH_JSON) + FetchContent_Declare( + json + URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz + ) + FetchContent_MakeAvailable(json) +else() + find_package(nlohmann_json 3.11.3 REQUIRED) +endif() include(GNUInstallDirs) @@ -304,13 +314,13 @@ set(CMAKE_INSTALL_RPATH $ORIGIN) set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) -#Overall target to link to when using the library -add_library(aare INTERFACE) -target_link_libraries(aare INTERFACE aare_core aare_compiler_flags) -target_include_directories(aare INTERFACE - $ - $ -) +# #Overall target to link to when using the library +# add_library(aare INTERFACE) +# target_link_libraries(aare INTERFACE aare_core aare_compiler_flags) +# target_include_directories(aare INTERFACE +# $ +# $ +# ) # add_subdirectory(examples) @@ -352,8 +362,8 @@ add_custom_target( VERBATIM ) -if(AARE_MASTER_PROJECT) - set(CMAKE_INSTALL_DIR "share/cmake/${PROJECT_NAME}") - set(PROJECT_LIBRARIES slsSupportShared slsDetectorShared slsReceiverShared) - include(cmake/package_config.cmake) -endif() \ No newline at end of file +# if(AARE_MASTER_PROJECT) +# set(CMAKE_INSTALL_DIR "share/cmake/${PROJECT_NAME}") +# set(PROJECT_LIBRARIES slsSupportShared slsDetectorShared slsReceiverShared) +# include(cmake/package_config.cmake) +# endif() \ No newline at end of file diff --git a/README.md b/README.md index 667a814..a78e533 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,28 @@ Data analysis library for PSI hybrid detectors -## Status -- [ ] Build with CMake on RH8 -- [ ] conda package +## Development install (for Python) + +```bash +git clone git@github.com:slsdetectorgroup/aare.git --branch=v1 #or using http... +mkdir build +cd build + +#configure using cmake +cmake ../aare + +#build (replace 4 with the number of threads you want to use) +make -j4 +``` + +Now you can use the Python module from your build directory + +```python +import aare + +f = aare.File('Some/File/I/Want_to_open_master_0.json') +``` ## Project structure