cpp.js 2.0.0-beta.1 → 2.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -42,11 +42,11 @@ export default function getCmakeParameters(platform, options = {}) {
|
|
|
42
42
|
const pathsOfCmakeDepends = dependParams.pathsOfCmakeDepends.split(';');
|
|
43
43
|
const nameOfCmakeDepends = dependParams.nameOfCmakeDepends.split(';');
|
|
44
44
|
const pathsOfCmakeDependsFilteredByPlatform = [];
|
|
45
|
-
const nameOfCmakeDependsFilteredByPlatform =
|
|
45
|
+
const nameOfCmakeDependsFilteredByPlatform = [];
|
|
46
46
|
pathsOfCmakeDepends.forEach((d, i) => {
|
|
47
|
-
if (fs.existsSync(`${d}/${platform}`)) {
|
|
47
|
+
if (fs.existsSync(`${d}/${platform}`) || (basePlatform === 'iOS' && fs.existsSync(`${d}/../../${nameOfCmakeDepends[i]}.xcframework`))) {
|
|
48
48
|
pathsOfCmakeDependsFilteredByPlatform.push(d);
|
|
49
|
-
|
|
49
|
+
nameOfCmakeDependsFilteredByPlatform.push(nameOfCmakeDepends[i]);
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
|
|
@@ -27,21 +27,27 @@ export default function calculateDependencyParameters(config) {
|
|
|
27
27
|
setPath(cmakeDepends, config, 'this', cmakeFilter);
|
|
28
28
|
cmakeDepends = [...new Set(cmakeDepends)];
|
|
29
29
|
|
|
30
|
-
const pathsOfCmakeDepends = [
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const pathsOfCmakeDepends = [];
|
|
31
|
+
const nameOfCmakeDepends = [];
|
|
32
|
+
cmakeDepends.forEach((d) => {
|
|
33
|
+
const dependPath = getParentPath(d.paths.cmake);
|
|
34
|
+
if (!pathsOfCmakeDepends.includes(dependPath)) {
|
|
35
|
+
pathsOfCmakeDepends.push(dependPath);
|
|
36
|
+
nameOfCmakeDepends.push(d.general.name);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
33
39
|
|
|
34
40
|
return {
|
|
35
41
|
nativeGlob,
|
|
36
42
|
headerGlob,
|
|
37
43
|
headerPathWithDepends,
|
|
38
44
|
cmakeDepends,
|
|
39
|
-
pathsOfCmakeDepends,
|
|
40
|
-
nameOfCmakeDepends,
|
|
45
|
+
pathsOfCmakeDepends: pathsOfCmakeDepends.join(';'),
|
|
46
|
+
nameOfCmakeDepends: nameOfCmakeDepends.join(';'),
|
|
41
47
|
};
|
|
42
48
|
}
|
|
43
49
|
|
|
44
|
-
function setPath(arr, dependency, type, filter = () => {}) {
|
|
50
|
+
function setPath(arr, dependency, type, filter = () => { }) {
|
|
45
51
|
if (filter(dependency)) {
|
|
46
52
|
if (type === 'this') {
|
|
47
53
|
arr.push(dependency);
|