Skip to content

Commit

Permalink
Replacing in-built sio with FetchContent mechanism (#181)
Browse files Browse the repository at this point in the history
* Replacing in-built sio with FetchContent mechanism

* Pinning SIO version at v00-01.
---------

Co-authored-by: Andre Rummler <andre.rummler@cern.ch>
Co-authored-by: Thomas Madlener <thomas.madlener@desy.de>
  • Loading branch information
3 people committed Dec 6, 2023
1 parent 0eb805e commit 3687a34
Show file tree
Hide file tree
Showing 21 changed files with 14 additions and 3,587 deletions.
20 changes: 12 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,18 @@ FIND_PACKAGE( SIO QUIET )

IF( NOT SIO_FOUND )
MESSAGE( STATUS "SIO not found on your system. Using builtin sio" )
ADD_SUBDIRECTORY( sio )
include(FetchContent)
FetchContent_Declare(sio_extern
GIT_REPOSITORY https://github.com/iLCSoft/SIO.git
GIT_TAG v00-01
GIT_SHALLOW 1
# FIND_PACKAGE_ARGS
)

FetchContent_MakeAvailable(sio_extern)

get_target_property(SIO_VERSION SIO::sio VERSION)
get_target_property(SIO_INCLUDE_DIRS SIO::sio INCLUDE_DIRECTORIES)
ENDIF()

MESSAGE( STATUS "Using SIO (${SIO_VERSION})" )
Expand Down Expand Up @@ -320,10 +331,3 @@ install(EXPORT ${PROJECT_NAME}Targets
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/"
)

IF( NOT SIO_FOUND )
install(EXPORT SIOTargets
NAMESPACE SIO::
FILE "SIOTargets.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/SIO/"
)
ENDIF()
50 changes: 0 additions & 50 deletions sio/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 3687a34

Please sign in to comment.