-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: restore GrokConfig.cmake file
- Loading branch information
Grok Compression
committed
Jan 11, 2025
1 parent
a677efc
commit d1aa7bd
Showing
4 changed files
with
78 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#----------------------------------------------------------------------------- | ||
# | ||
# GrokConfig.cmake - CMake configuration file for external projects. | ||
# | ||
# This file is configured by Grok and used to load Grok's settings for external projects. | ||
@PACKAGE_INIT@ | ||
|
||
# The Grok version number | ||
set(Grok_MAJOR_VERSION "@GROK_VERSION_MAJOR@") | ||
set(Grok_MINOR_VERSION "@GROK_VERSION_MINOR@") | ||
set(Grok_PATCH_VERSION "@GROK_VERSION_PATCH@") | ||
set(Grok_VERSION "@GROK_VERSION_MAJOR@.@GROK_VERSION_MINOR@.@GROK_VERSION_PATCH@") | ||
|
||
# The libraries | ||
set(Grok_LIBRARIES "Grok::@GROK_CORE_NAME@" "Grok::@GROK_CODEC_NAME@") | ||
|
||
# CMake macros directory | ||
set(Grok_CMAKE_DIR "@GROK_INSTALL_PACKAGE_DIR@") | ||
|
||
# Configuration options | ||
set(Grok_BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@") | ||
|
||
# Determine the prefix directory | ||
set(PACKAGE_PREFIX_DIR "@CMAKE_INSTALL_PREFIX@") | ||
|
||
# Detect install or build tree | ||
get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
if(EXISTS "${SELF_DIR}/GrokTargets.cmake") | ||
# Install tree | ||
include("${SELF_DIR}/GrokTargets.cmake") | ||
|
||
# Include directories | ||
set(Grok_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@/@GROK_INSTALL_SUBDIR@") | ||
|
||
elseif(EXISTS "${SELF_DIR}/GrokExports.cmake") | ||
# Build tree | ||
include("${SELF_DIR}/GrokExports.cmake") | ||
|
||
# Include directories for build tree | ||
set(Grok_INCLUDE_DIRS "@GROK_INCLUDE_PATH@") | ||
|
||
else() | ||
# Error if neither install nor build tree targets are found | ||
message(FATAL_ERROR | ||
"Could not find GrokTargets.cmake (install tree) or GrokExports.cmake (build tree). " | ||
"Ensure Grok is built and installed correctly.") | ||
endif() | ||
|
||
# Backward compatibility variables | ||
set(Grok_FOUND TRUE) | ||
set(Grok_INCLUDE_DIR "${Grok_INCLUDE_DIRS}") | ||
set(Grok_VERSION_MAJOR "${Grok_MAJOR_VERSION}") | ||
set(Grok_VERSION_MINOR "${Grok_MINOR_VERSION}") | ||
set(Grok_VERSION_PATCH "${Grok_PATCH_VERSION}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* Grok Version */ | ||
#define GRK_VERSION_MAJOR @GROK_VERSION_MAJOR@ | ||
#define GRK_VERSION_MINOR @GROK_VERSION_MINOR@ | ||
#define GRK_VERSION_BUILD @GROK_VERSION_BUILD@ | ||
#define GRK_VERSION_BUILD @GROK_VERSION_PATCH@ |