Skip to content

Commit 1ef5ec7

Browse files
committed
fix cmake packaging version grabbing
1 parent 7545059 commit 1ef5ec7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ if(NOT DEFINED CMAKE_GENERATOR AND UNIX)
123123
set(CMAKE_GENERATOR "Unix Makefiles")
124124
endif()
125125

126-
# If using MSVC, always enable multi-process compiling for all targets.1
126+
# If using MSVC, always enable multi-process compiling for all targets.
127127
# Note that this setting is repeated for rerun_sdk's CMakeLists.txt since it should also work stand-alone.
128128
if(MSVC)
129129
add_compile_options("/MP")

rerun_cpp/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ if(MSVC AND BUILD_SHARED_LIBS)
126126
# in CMake the behavior of Linux/macOS. However, it does not cover
127127
# static variables.
128128
set_property(TARGET rerun_sdk PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS ON)
129+
129130
# For exporting static variables in shared libraries in Windows, it
130131
# is not possible to just use WINDOWS_EXPORT_ALL_SYMBOLS, we need instead
131132
# to manually annotate with the appropriate storage-class attributes
@@ -196,7 +197,7 @@ include(CMakePackageConfigHelpers)
196197

197198
# Extract the version from rerun.h.
198199
# Intentionally only grab major.minor.patch, not the full version, since version file can't handle it otherwise.
199-
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/src/rerun/c/rerun.h" RERUN_H_CONTENTS)
200+
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/src/rerun/c/sdk_info.h" RERUN_H_CONTENTS)
200201
string(REGEX MATCH "\n#define RERUN_SDK_HEADER_VERSION \"([0-9]+.[0-9]+.[0-9]+)" _ ${RERUN_H_CONTENTS})
201202
set(RERUN_INSTALL_VERSION ${CMAKE_MATCH_1})
202203
message(STATUS "Rerun SDK install version: ${RERUN_INSTALL_VERSION}")

0 commit comments

Comments
 (0)