-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache Directory stubs, cmake setup test
- Loading branch information
William C Bonner
committed
Sep 18, 2023
1 parent
5e78e87
commit 1f70821
Showing
7 changed files
with
295 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# CMakeList.txt : CMake project for influxd-wind-svg, include source and define | ||
# project specific logic here. | ||
# | ||
cmake_minimum_required(VERSION 3.12.0) | ||
|
||
# Enable Hot Reload for MSVC compilers if supported. | ||
if (POLICY CMP0141) | ||
cmake_policy(SET CMP0141 NEW) | ||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>") | ||
endif() | ||
|
||
project ("goveebttemplogger" | ||
VERSION 2.20230918-1 | ||
DESCRIPTION "Govee H5074, H5075, H5100, H5174, H5177, H5179, H5181, H5182, and H5183 Bluetooth Low Energy Temperature and Humidity Logger" | ||
HOMEPAGE_URL https://github.com/wcbonner/GoveeBTTempLogger | ||
) | ||
|
||
configure_file(goveebttemplogger-version.h.in goveebttemplogger-version.h) | ||
|
||
# Add source to this project's executable. | ||
add_executable (goveebttemplogger "goveebttemplogger.cpp" "uuid.c" "uuid.h") | ||
|
||
add_executable(gvh-organizelogs "gvh-organizelogs.cpp") | ||
|
||
if (CMAKE_VERSION VERSION_GREATER 3.12) | ||
set_property(TARGET goveebttemplogger PROPERTY CXX_STANDARD 20) | ||
endif() | ||
|
||
target_include_directories(goveebttemplogger PUBLIC | ||
"${PROJECT_BINARY_DIR}" | ||
${EXTRA_INCLUDES} | ||
) | ||
|
||
# TODO: Add tests and install targets if needed. | ||
|
||
install(TARGETS goveebttemplogger | ||
DESTINATION bin | ||
RUNTIME DESTINATION "/usr/local/bin/" | ||
LIBRARY DESTINATION "/usr/local/lib/" | ||
) | ||
|
||
install(FILES "GoveeBTTempLogger/usr/local/lib/systemd/system/goveebttemplogger.service" | ||
DESTINATION "/usr/local/lib/systemd/system" | ||
COMPONENT "goveebttemplogger" | ||
) | ||
|
||
set(CPACK_GENERATOR "DEB") | ||
set(CPACK_PACKAGE_CONTACT "[email protected]") | ||
include(InstallRequiredSystemLibraries) | ||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt") | ||
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) | ||
set(CPACK_DEBIAN_PACKAGE_RELEASE ${CMAKE_PROJECT_VERSION_PATCH}) | ||
set(CPACK_DEBIAN_PACKAGE_DEPENDS curl,influxdb) | ||
set(CPACK_DEBIAN_PACKAGE_SECTION custom) | ||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/GoveeBTTempLogger/DEBIAN/postinst" "${CMAKE_CURRENT_SOURCE_DIR}/GoveeBTTempLogger/DEBIAN/prerm" "${CMAKE_CURRENT_SOURCE_DIR}/GoveeBTTempLogger/DEBIAN/postrm") | ||
include(CPack) |
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,101 @@ | ||
{ | ||
"version": 3, | ||
"configurePresets": [ | ||
{ | ||
"name": "windows-base", | ||
"hidden": true, | ||
"generator": "Ninja", | ||
"binaryDir": "${sourceDir}/out/build/${presetName}", | ||
"installDir": "${sourceDir}/out/install/${presetName}", | ||
"cacheVariables": { | ||
"CMAKE_C_COMPILER": "cl.exe", | ||
"CMAKE_CXX_COMPILER": "cl.exe" | ||
}, | ||
"condition": { | ||
"type": "equals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Windows" | ||
} | ||
}, | ||
{ | ||
"name": "x64-debug", | ||
"displayName": "x64 Debug", | ||
"inherits": "windows-base", | ||
"architecture": { | ||
"value": "x64", | ||
"strategy": "external" | ||
}, | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug" | ||
} | ||
}, | ||
{ | ||
"name": "x64-release", | ||
"displayName": "x64 Release", | ||
"inherits": "x64-debug", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Release" | ||
} | ||
}, | ||
{ | ||
"name": "x86-debug", | ||
"displayName": "x86 Debug", | ||
"inherits": "windows-base", | ||
"architecture": { | ||
"value": "x86", | ||
"strategy": "external" | ||
}, | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug" | ||
} | ||
}, | ||
{ | ||
"name": "x86-release", | ||
"displayName": "x86 Release", | ||
"inherits": "x86-debug", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Release" | ||
} | ||
}, | ||
{ | ||
"name": "linux-debug", | ||
"displayName": "Linux Debug", | ||
"generator": "Ninja", | ||
"binaryDir": "${sourceDir}/out/build/${presetName}", | ||
"installDir": "${sourceDir}/out/install/${presetName}", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug" | ||
}, | ||
"condition": { | ||
"type": "equals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Linux" | ||
}, | ||
"vendor": { | ||
"microsoft.com/VisualStudioRemoteSettings/CMake/1.0": { | ||
"sourceDir": "$env{HOME}/.vs/$ms{projectDirName}" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "macos-debug", | ||
"displayName": "macOS Debug", | ||
"generator": "Ninja", | ||
"binaryDir": "${sourceDir}/out/build/${presetName}", | ||
"installDir": "${sourceDir}/out/install/${presetName}", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug" | ||
}, | ||
"condition": { | ||
"type": "equals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Darwin" | ||
}, | ||
"vendor": { | ||
"microsoft.com/VisualStudioRemoteSettings/CMake/1.0": { | ||
"sourceDir": "$env{HOME}/.vs/$ms{projectDirName}" | ||
} | ||
} | ||
} | ||
] | ||
} |
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
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,4 @@ | ||
#pragma once | ||
#define QUOTE(x) #x | ||
#define STR(x) QUOTE(x) | ||
#define GoveeBTTempLogger_VERSION STR(@CMAKE_PROJECT_VERSION@) |
Oops, something went wrong.