From 9c3350a986a5c1d023ec81fc0c8f96aebc0be21f Mon Sep 17 00:00:00 2001 From: Twarit Waikar Date: Fri, 27 May 2022 12:57:45 +0530 Subject: [PATCH] build: Add support for Helix Core C++ API version 2021.2 --- README.md | 3 ++- p4-fusion/CMakeLists.txt | 14 ++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f3a9eae1..ef958b1c 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,8 @@ These execution times are expected to scale as expected with larger depots (mill * Install CMake 3.16+. * Install g++ 11.2.0 (older versions compatible with C++11 are also supported). * Clone this repository or [get a release distribution](https://github.com/salesforce/p4-fusion/releases). - * Get Helix Core C++ API from the [official Perforce distribution](https://www.perforce.com/downloads/helix-core-c/c-api). Version 2021.1/2179737 shall have the best compatibility. Extract the contents in `./vendor/helix-core-api/linux/` or `./vendor/helix-core-api/mac/` based on your OS. + * Get Helix Core C++ API from the [official Perforce distribution](https://www.perforce.com/downloads/helix-core-c/c-api). Both the 2021.1 and 2021.2 versions of the Helix Core C++ API will work. + * Extract the contents in `./vendor/helix-core-api/linux/` or `./vendor/helix-core-api/mac/` based on your OS. > For CentOS, you can try `yum install git make cmake gcc-c++ libarchive` to set up the compilation toolchain. Installing `libarchive` is only required to fix a bug that stops CMake from starting properly. diff --git a/p4-fusion/CMakeLists.txt b/p4-fusion/CMakeLists.txt index 48477758..4f9ba21b 100644 --- a/p4-fusion/CMakeLists.txt +++ b/p4-fusion/CMakeLists.txt @@ -24,14 +24,16 @@ target_link_directories(p4-fusion PUBLIC set(Frameworks "") if (APPLE) - find_library(corefoundation_lib CoreFoundation REQUIRED) - find_library(cfnetwork_lib CFNetwork REQUIRED) - find_library(COCOA_LIBRARY Cocoa REQUIRED) + find_library(COREFOUNDATION_LIB CoreFoundation REQUIRED) + find_library(CFNETWORK_LIB CFNetwork REQUIRED) + find_library(COCOA_LIB Cocoa REQUIRED) + find_library(SECURITY_LIB Security REQUIRED) set(Frameworks ${Frameworks} - ${cfnetwork_lib} - ${corefoundation_lib} - ${COCOA_LIBRARY} + ${CFNETWORK_LIB} + ${COREFOUNDATION_LIB} + ${COCOA_LIB} + ${SECURITY_LIB} ) endif(APPLE)