@@ -572,6 +572,15 @@ function run() {
572572 core.debug("proj=".concat(proj));
573573 core.debug("build_order=".concat(build_order));
574574 core.debug("proj in build_order=".concat(proj in build_order));
575+ if (proj == version_2.Project.SDL12_compat &&
576+ (build_order.indexOf(version_2.Project.SDL) >= 0 ||
577+ build_order.indexOf(version_2.Project.SDL2_compat) >= 0)) {
578+ return 1;
579+ }
580+ if (proj == version_2.Project.SDL2_compat &&
581+ build_order.indexOf(version_2.Project.SDL) >= 0) {
582+ return 1;
583+ }
575584 return build_order.findIndex(function (e) { return e == proj; }) >= 0;
576585 })) {
577586 build_order.push(project_left);
@@ -590,7 +599,7 @@ function run() {
590599 package_dirs = {};
591600 project_versions = {};
592601 _loop_1 = function (project) {
593- var project_description, req_step_version, git_branch_hash, git_hash, project_cmake_arguments, dependency_hashes, project_hash, package_dir, cache_key, cache_paths, was_in_cache, project_packages, source_dir, build_dir, cmake_configure_args, CMAKE_GENERATOR, version_extractor, project_version, cmake_export_name;
602+ var project_description, req_step_version, git_branch_hash, git_hash, project_cmake_arguments, dependency_hashes, project_hash, package_dir, cache_key, cache_paths, was_in_cache, project_packages, source_dir, build_dir, cmake_configure_args, CMAKE_GENERATOR, version_extractor, project_version, infix, cmake_export_name;
594603 return __generator(this, function (_c) {
595604 switch (_c.label) {
596605 case 0:
@@ -756,7 +765,8 @@ function run() {
756765 project_version = version_extractor.extract_from_install_prefix(package_dir);
757766 project_versions[project] = project_version;
758767 core.info("".concat(project, " version is ").concat(project_version.toString()));
759- cmake_export_name = "".concat(project_description.cmake_var_out_prefix).concat(project_version.major).concat(project_description.cmake_var_out_suffix);
768+ infix = project_version.major == 1 ? "" : "".concat(project_version.major);
769+ cmake_export_name = "".concat(project_description.cmake_var_out_prefix).concat(infix).concat(project_description.cmake_var_out_suffix);
760770 core.exportVariable(cmake_export_name, package_dir);
761771 return [2 /*return*/];
762772 }
@@ -1525,6 +1535,8 @@ exports.Version = Version;
15251535var Project;
15261536(function (Project) {
15271537 Project["SDL"] = "SDL";
1538+ Project["SDL2_compat"] = "SDL2_compat";
1539+ Project["SDL12_compat"] = "SDL12_compat";
15281540 Project["SDL_image"] = "SDL_image";
15291541 Project["SDL_mixer"] = "SDL_mixer";
15301542 Project["SDL_net"] = "SDL_net";
@@ -1760,6 +1772,36 @@ exports.project_descriptions = (_a = {},
17601772 },
17611773 _c),
17621774 },
1775+ _a[Project.SDL2_compat] = {
1776+ option_name: "version-sdl2-compat",
1777+ cmake_var_out_prefix: "SDL2",
1778+ cmake_var_out_suffix: "_ROOT",
1779+ deps: [Project.SDL],
1780+ major_define: "SDL_MAJOR_VERSION",
1781+ minor_define: "SDL_MINOR_VERSION",
1782+ patch_define: "SDL_PATCHLEVEL",
1783+ header_paths: ["include/SDL2"],
1784+ header_filenames: ["SDL_version.h"],
1785+ git_url: "https://github.com/libsdl-org/sdl2-compat.git",
1786+ repo_owner: "libsdl-org",
1787+ repo_name: "sdl2-compat",
1788+ version_branch_map: { 2: "main" },
1789+ },
1790+ _a[Project.SDL12_compat] = {
1791+ option_name: "version-sdl12-compat",
1792+ cmake_var_out_prefix: "SDL",
1793+ cmake_var_out_suffix: "_ROOT",
1794+ deps: [Project.SDL2_compat],
1795+ major_define: "SDL_MAJOR_VERSION",
1796+ minor_define: "SDL_MINOR_VERSION",
1797+ patch_define: "SDL_PATCHLEVEL",
1798+ header_paths: ["include/SDL"],
1799+ header_filenames: ["SDL_version.h"],
1800+ git_url: "https://github.com/libsdl-org/sdl12-compat.git",
1801+ repo_owner: "libsdl-org",
1802+ repo_name: "sdl12-compat",
1803+ version_branch_map: { 1: "main" },
1804+ },
17631805 _a);
17641806var ReleaseType;
17651807(function (ReleaseType) {
0 commit comments