Skip to content

Commit

Permalink
Fix plugin name and version string for in-tree build
Browse files Browse the repository at this point in the history
There were remaining CMAKE_PROJECT_NAME and CMAKE_PROJECT_VERSION so
that this commit replaced all of them.
  • Loading branch information
norihiro committed May 10, 2024
1 parent a8a6bba commit be51d15
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if(APPLE)

set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
set(MACOSX_PLUGIN_GUI_IDENTIFIER "${MACOS_BUNDLEID}")
set(MACOSX_PLUGIN_BUNDLE_VERSION "${CMAKE_PROJECT_VERSION}")
set(MACOSX_PLUGIN_BUNDLE_VERSION "${PROJECT_VERSION}")
set(MACOSX_PLUGIN_SHORT_VERSION_STRING "1")
endif()

Expand Down
4 changes: 2 additions & 2 deletions ci/ci_includes.cmd.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
set PluginName=@CMAKE_PROJECT_NAME@
set PluginVersion=@CMAKE_PROJECT_VERSION@
set PluginName=@PROJECT_NAME@
set PluginVersion=@PROJECT_VERSION@
4 changes: 2 additions & 2 deletions ci/ci_includes.sh.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PLUGIN_NAME="@CMAKE_PROJECT_NAME@"
PLUGIN_VERSION="@CMAKE_PROJECT_VERSION@"
PLUGIN_NAME="@PROJECT_NAME@"
PLUGIN_VERSION="@PROJECT_VERSION@"
MACOS_BUNDLEID="@MACOS_BUNDLEID@"
LINUX_MAINTAINER_EMAIL="@LINUX_MAINTAINER_EMAIL@"
PKG_SUFFIX='@PKG_SUFFIX@'
4 changes: 2 additions & 2 deletions cmake/ObsPluginHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ else()
endif()

if(OS_LINUX)
set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${LINUX_MAINTAINER_EMAIL}")
set(CPACK_PACKAGE_VERSION "${CMAKE_PROJECT_VERSION}")
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
set(PKG_SUFFIX "-linux-x86_64" CACHE STRING "Suffix of package name")
set(CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}${PKG_SUFFIX}")
Expand Down
4 changes: 2 additions & 2 deletions installer/installer-Windows.iss.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define MyAppName "@CMAKE_PROJECT_NAME@"
#define MyAppVersion "@CMAKE_PROJECT_VERSION@"
#define MyAppName "@PROJECT_NAME@"
#define MyAppVersion "@PROJECT_VERSION@"
#define MyAppPublisher "@PLUGIN_AUTHOR@"
#define MyAppURL "http://www.mywebsite.com"

Expand Down
8 changes: 4 additions & 4 deletions installer/installer-macOS.pkgproj.in
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
<string>../@RELATIVE_INSTALL_PATH@/@CMAKE_PROJECT_NAME@@FIRST_DIR_SUFFIX@</string>
<string>../@RELATIVE_INSTALL_PATH@/@PROJECT_NAME@@FIRST_DIR_SUFFIX@</string>
<key>PATH_TYPE</key>
<integer>1</integer>
<key>PERMISSIONS</key>
Expand Down Expand Up @@ -521,7 +521,7 @@
<key>LOCATION</key>
<integer>0</integer>
<key>NAME</key>
<string>@CMAKE_PROJECT_NAME@</string>
<string>@PROJECT_NAME@</string>
<key>OVERWRITE_PERMISSIONS</key>
<false/>
<key>PAYLOAD_SIZE</key>
Expand All @@ -533,7 +533,7 @@
<key>USE_HFS+_COMPRESSION</key>
<false/>
<key>VERSION</key>
<string>@CMAKE_PROJECT_VERSION@</string>
<string>@PROJECT_VERSION@</string>
</dict>
<key>TYPE</key>
<integer>0</integer>
Expand Down Expand Up @@ -905,7 +905,7 @@
</dict>
</array>
<key>NAME</key>
<string>@CMAKE_PROJECT_NAME@@PKG_SUFFIX@</string>
<string>@PROJECT_NAME@@PKG_SUFFIX@</string>
<key>PAYLOAD_ONLY</key>
<false/>
<key>TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING</key>
Expand Down
4 changes: 2 additions & 2 deletions plugin-macros.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#ifndef PLUGIN_MACROS_H
#define PLUGIN_MACROS_H

#define PLUGIN_NAME "@CMAKE_PROJECT_NAME@"
#define PLUGIN_VERSION "@CMAKE_PROJECT_VERSION@"
#define PLUGIN_NAME "@PROJECT_NAME@"
#define PLUGIN_VERSION "@PROJECT_VERSION@"

#define blog(level, msg, ...) blog(level, "[" PLUGIN_NAME "] " msg, ##__VA_ARGS__)

Expand Down

0 comments on commit be51d15

Please sign in to comment.