diff --git a/CMakeLists.txt b/CMakeLists.txt index 098c1eaf..780dfe76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -262,11 +262,11 @@ set(${PropertyPrefix}SIGN_PASSWORD "" CACHE STRING "Password for the private key # Configure Version Header configure_file( - "cmake/version.hpp.in" + "templates/version.hpp.in" "${PROJECT_BINARY_DIR}/generated/version.hpp" ) configure_file( - "cmake/module.cpp.in" + "templates/module.cpp.in" "${PROJECT_BINARY_DIR}/generated/module.cpp" ) @@ -291,7 +291,7 @@ if(NOT TARGET libobs) get_filename_component(ISS_MSVCHELPER_PATH "${msvc-redist-helper_BUILD_DIR}" ABSOLUTE) file(TO_NATIVE_PATH "${ISS_MSVCHELPER_PATH}" ISS_MSVCHELPER_PATH) configure_file( - "cmake/installer.iss.in" + "templates/installer.iss.in" "${PROJECT_BINARY_DIR}/installer.iss" ) @@ -303,7 +303,7 @@ if(NOT TARGET libobs) set(PROJECT_LEGAL_TRADEMARKS_2 "") configure_file( - "cmake/version.rc.in" + "templates/version.rc.in" "${PROJECT_BINARY_DIR}/generated/version.rc" @ONLY ) @@ -466,8 +466,8 @@ list(APPEND PROJECT_DATA "data/effects/pack-unpack.effect" ) list(APPEND PROJECT_TEMPLATES - "cmake/version.hpp.in" - "cmake/module.cpp.in" + "templates/version.hpp.in" + "templates/module.cpp.in" ) list(APPEND PROJECT_PRIVATE_SOURCE # Plugin @@ -534,8 +534,8 @@ list(APPEND PROJECT_PRIVATE_GENERATED ) if(WIN32) list(APPEND PROJECT_TEMPLATES - "cmake/installer.iss.in" - "cmake/version.rc.in" + "templates/installer.iss.in" + "templates/version.rc.in" ) list(APPEND PROJECT_PRIVATE_SOURCE "source/windll.cpp" @@ -902,9 +902,11 @@ set(PROJECT_PRIVATE source_group(TREE "${PROJECT_SOURCE_DIR}/data" PREFIX "Data Files" FILES ${PROJECT_DATA}) source_group(TREE "${PROJECT_SOURCE_DIR}/source" PREFIX "Code Files" FILES ${PROJECT_PRIVATE_SOURCE}) source_group(TREE "${PROJECT_BINARY_DIR}/generated" PREFIX "Generated Files" FILES ${PROJECT_PRIVATE_GENERATED}) -source_group(TREE "${PROJECT_SOURCE_DIR}/cmake" PREFIX "Template Files" FILES ${PROJECT_TEMPLATES}) +source_group(TREE "${PROJECT_SOURCE_DIR}/templates" PREFIX "Template Files" FILES ${PROJECT_TEMPLATES}) source_group(TREE "${PROJECT_SOURCE_DIR}/ui" PREFIX "User Interface Files" FILES ${PROJECT_UI}) +set_source_files_properties(${PROJECT_TEMPLATES} PROPERTIES HEADER_FILE_ONLY TRUE) + ################################################################################ # Target ################################################################################ diff --git a/cmake/installer.iss.in b/templates/installer.iss.in similarity index 100% rename from cmake/installer.iss.in rename to templates/installer.iss.in diff --git a/cmake/module.cpp.in b/templates/module.cpp.in similarity index 99% rename from cmake/module.cpp.in rename to templates/module.cpp.in index 44bd6882..7eb1c2a6 100644 --- a/cmake/module.cpp.in +++ b/templates/module.cpp.in @@ -17,7 +17,6 @@ MODULE_EXPORT const char* obs_module_name() return "@PROJECT_FULL_NAME@"; } - MODULE_EXPORT const char* obs_module_description() { return "@PROJECT_DESCRIPTION@"; diff --git a/cmake/version.hpp.in b/templates/version.hpp.in similarity index 74% rename from cmake/version.hpp.in rename to templates/version.hpp.in index d890fba7..f08f54d0 100644 --- a/cmake/version.hpp.in +++ b/templates/version.hpp.in @@ -21,7 +21,9 @@ #include #include -#define STREAMFX_MAKE_VERSION(major,minor,patch,tweak) (((uint64_t(major) & 0xFFFFull) << 48ull) | ((uint64_t(minor) & 0xFFFFull) << 32ull) | ((uint64_t(patch) & 0xFFFFull) << 16ull) | ((uint64_t(tweak) & 0xFFFFull))) +#define STREAMFX_MAKE_VERSION(major, minor, patch, tweak) \ + (((uint64_t(major) & 0xFFFFull) << 48ull) | ((uint64_t(minor) & 0xFFFFull) << 32ull) \ + | ((uint64_t(patch) & 0xFFFFull) << 16ull) | ((uint64_t(tweak) & 0xFFFFull))) #define STREAMFX_MASK_MAJOR 0xFFFF000000000000ull #define STREAMFX_MASK_COMPAT 0xFFFFFFFF00000000ull @@ -34,5 +36,7 @@ #define STREAMFX_VERSION_BUILD @PROJECT_VERSION_TWEAK@ #define STREAMFX_VERSION_TWEAK @PROJECT_VERSION_TWEAK@ #define STREAMFX_VERSION_SUFFIX @VERSION_SUFFIX@ -#define STREAMFX_VERSION STREAMFX_MAKE_VERSION(STREAMFX_VERSION_MAJOR, STREAMFX_VERSION_MINOR, STREAMFX_VERSION_PATCH, STREAMFX_VERSION_BUILD) +#define STREAMFX_VERSION \ + STREAMFX_MAKE_VERSION(STREAMFX_VERSION_MAJOR, STREAMFX_VERSION_MINOR, STREAMFX_VERSION_PATCH, \ + STREAMFX_VERSION_BUILD) #define STREAMFX_VERSION_STRING "@VERSION_STRING@" diff --git a/cmake/version.rc.in b/templates/version.rc.in similarity index 100% rename from cmake/version.rc.in rename to templates/version.rc.in