diff --git a/API/hermes/CMakeLists.txt b/API/hermes/CMakeLists.txt index 0d05c5612e6..b56eca19875 100644 --- a/API/hermes/CMakeLists.txt +++ b/API/hermes/CMakeLists.txt @@ -47,7 +47,15 @@ add_hermes_library(compileJS STATIC CompileJS.cpp) set(HERMES_ENABLE_EH ON) set(HERMES_ENABLE_RTTI ON) -add_library(libhermes SHARED ${api_sources}) +set(HERMES_VER_MAJOR ${PROJECT_VERSION_MAJOR}) +set(HERMES_VER_MINOR ${PROJECT_VERSION_MINOR}) +set(HERMES_VER_BUILD ${PROJECT_VERSION_PATCH}) +set(HERMES_VER_REVISION ${VERSION_SUFFIX}) + +configure_file(version.rc.in version.rc @ONLY) + +add_library(libhermes SHARED ${api_sources} + ${CMAKE_CURRENT_BINARY_DIR}/version.rc) # This is configured using a cmake flag instead of a separate target, because # we need the output to be named "libhermes.so". diff --git a/API/hermes/version.rc.in b/API/hermes/version.rc.in new file mode 100644 index 00000000000..eb0ab40d8eb --- /dev/null +++ b/API/hermes/version.rc.in @@ -0,0 +1,33 @@ +#include + +VS_VERSION_INFO VERSIONINFO +FILEVERSION @HERMES_VER_MAJOR@,@HERMES_VER_MINOR@,@HERMES_VER_BUILD@,0 +PRODUCTVERSION @HERMES_VER_MAJOR@,@HERMES_VER_MINOR@,@HERMES_VER_BUILD@,0 +FILEFLAGSMASK 0x17L +#ifdef _DEBUG +FILEFLAGS 0x1L +#else +FILEFLAGS 0x0L +#endif +FILEOS 0x4L +FILETYPE 0x1L +FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "Hermes JavaScript Engine" + VALUE "FileVersion", "@HERMES_VER_MAJOR@.@HERMES_VER_MINOR@.@HERMES_VER_BUILD@.@HERMES_VER_REVISION@" + VALUE "InternalName", "hermes.dll" + VALUE "OriginalFilename", "hermes.dll" + VALUE "ProductName", "Hermes JavaScript Engine" + VALUE "ProductVersion", "@HERMES_VER_MAJOR@.@HERMES_VER_MINOR@.@HERMES_VER_BUILD@.@HERMES_VER_REVISION@" + VALUE "ProductShortName", "Hermes" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END \ No newline at end of file diff --git a/API/inspector/react-native/CMakeLists.txt b/API/inspector/react-native/CMakeLists.txt index fd0aab3f0da..777633647ef 100644 --- a/API/inspector/react-native/CMakeLists.txt +++ b/API/inspector/react-native/CMakeLists.txt @@ -39,7 +39,9 @@ if(NOT reactnative_POPULATED) file(GLOB_RECURSE YARN_FILES ${reactnative_SOURCE_DIR}/yarn.lock ${reactnative_SOURCE_DIR}/**/yarn.lock) message("Removing unused yarn.lock files: ${YARN_FILES}") - file(REMOVE ${YARN_FILES}) + if(YARN_FILES) + file(REMOVE ${YARN_FILES}) + endif() endif() set(REACT_NATIVE_SOURCE ${reactnative_SOURCE_DIR} PARENT_SCOPE) diff --git a/CMakeLists.txt b/CMakeLists.txt index b19f961931e..af758455072 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,8 +73,8 @@ endif() project(Hermes VERSION 0.11.0 LANGUAGES C CXX) -# Optional suffix like "-rc3" -set(VERSION_SUFFIX "") +# Optional suffix like "rc3" +set(VERSION_SUFFIX "ms.3") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/") @@ -83,7 +83,7 @@ set(LLVH_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/llvh) include(Hermes) include(Lit) -set(HERMES_RELEASE_VERSION ${PROJECT_VERSION}${VERSION_SUFFIX}) +set(HERMES_RELEASE_VERSION ${PROJECT_VERSION}-${VERSION_SUFFIX}) include(FindPythonInterp) if (NOT PYTHONINTERP_FOUND) @@ -455,7 +455,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4312") # Parallelize build if (HERMES_MSVC_MP) - add_definitions( /MP ) + add_compile_options( /MP ) endif() endif()