Skip to content

Commit

Permalink
Add StreamPU version 0.1.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
kouchy committed May 27, 2024
1 parent 1ab4b49 commit 0faa83d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 11 deletions.
36 changes: 25 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ set(LIBRARY_OUTPUT_PATH lib/)
# Generate the source files list
file(GLOB_RECURSE source_files ${CMAKE_CURRENT_SOURCE_DIR}/src/*)

# ---------------------------------------------------------------------------------------------------------------------
# ------------------------------------------------------------------------------------------------------ GENERATE FILES
# ---------------------------------------------------------------------------------------------------------------------

# ------------------------------------------------------------------------------------------------------------- VERSION
set(SPU_VERSION_MAJOR 0)
set(SPU_VERSION_MINOR 1)
set(SPU_VERSION_PATCH 0)

message(STATUS "StreamPU - Version: ${SPU_VERSION_MAJOR}.${SPU_VERSION_MINOR}.${SPU_VERSION_PATCH}")

# Auto generate cmake config version file to link with StreamPU lib (only if an StreamPU library has been compiled)
if (SPU_COMPILE_STATIC_LIB OR SPU_COMPILE_SHARED_LIB)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/streampu-config-version.cmake.in"
"lib/cmake/streampu/streampu-config-version.cmake" @ONLY)
endif()

# ---------------------------------------------------------------------------------------------------------------------
# ------------------------------------------------------------------------------------------------------ CREATE FILTERS
# ---------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -290,7 +307,7 @@ macro(spu_target_include_directories targets privacy dir_build dir_install)
target_include_directories(${_target}
${privacy}
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/${dir_build}/>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/streampu/${dir_install}>)
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${dir_install}>)
endforeach()
endmacro()

Expand Down Expand Up @@ -412,28 +429,25 @@ if (SPU_COMPILE_SHARED_LIB OR SPU_COMPILE_STATIC_LIB)
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/streampu/"
NAMESPACE spu::
COMPONENT library)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/streampu/streampu-config-version.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/streampu/"
COMPONENT library)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/streampu/streampu
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/streampu/
COMPONENT headers
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/streampu/streampu
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/streampu/
COMPONENT headers
FILES_MATCHING PATTERN "*.hpp")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/streampu/streampu
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/streampu/
COMPONENT headers
FILES_MATCHING PATTERN "*.hxx")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/lib/rang/include/"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/streampu/rang
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rang
COMPONENT headers
FILES_MATCHING PATTERN "*.hpp")
if(SPU_STACKTRACE OR SPU_STACKTRACE_SEGFAULT)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/lib/cpptrace/include/"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/streampu/cpptrace
COMPONENT headers
FILES_MATCHING PATTERN "*.hpp")
endif()
endif()

# ---------------------------------------------------------------------------------------------------------------------
Expand Down
11 changes: 11 additions & 0 deletions cmake/Modules/streampu-config-version.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set(PACKAGE_VERSION "@SPU_VERSION_MAJOR@.@SPU_VERSION_MINOR@.@SPU_VERSION_PATCH@")

# Check whether the requested PACKAGE_FIND_VERSION is compatible
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
1 change: 1 addition & 0 deletions include/Tools/Reporter/Probe/Reporter_probe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <typeindex>
#include <vector>

#include "Tools/Interface/Interface_get_set_n_frames.hpp"
#include "Tools/Reporter/Reporter.hpp"

namespace spu
Expand Down

0 comments on commit 0faa83d

Please sign in to comment.