|
29 | 29 | cfg_vcpkg_description = '(no description found)' |
30 | 30 | cfg_vcpkg_root = os.environ['VCPKG_ROOT'] |
31 | 31 |
|
| 32 | +cfg_cmake_optpfx = "VARIANT_LITE" |
| 33 | + |
32 | 34 | # End configuration. |
33 | 35 |
|
34 | 36 | # vcpkg control and port templates: |
|
51 | 53 | SHA512 {sha} |
52 | 54 | ) |
53 | 55 |
|
54 | | -# To allow side-by-side use with ms-gsl, only provide include/gsl/gsl-lite.hpp: |
| 56 | +vcpkg_configure_cmake( |
| 57 | + SOURCE_PATH ${{SOURCE_PATH}} |
| 58 | + PREFER_NINJA |
| 59 | + OPTIONS |
| 60 | + -D{optpfx}_OPT_BUILD_TESTS=OFF |
| 61 | + -D{optpfx}_OPT_BUILD_EXAMPLES=OFF |
| 62 | +) |
| 63 | +
|
| 64 | +vcpkg_install_cmake() |
| 65 | +
|
| 66 | +vcpkg_fixup_cmake_targets( |
| 67 | + CONFIG_PATH lib/cmake/${{PORT}} |
| 68 | +) |
| 69 | +
|
| 70 | +file(REMOVE_RECURSE |
| 71 | + ${{CURRENT_PACKAGES_DIR}}/debug |
| 72 | + ${{CURRENT_PACKAGES_DIR}}/lib |
| 73 | +) |
55 | 74 |
|
56 | | -file(INSTALL ${{SOURCE_PATH}}/include/gsl/gsl-lite.hpp DESTINATION ${{CURRENT_PACKAGES_DIR}}/include/gsl) |
57 | | -file(INSTALL ${{SOURCE_PATH}}/{lic} DESTINATION ${{CURRENT_PACKAGES_DIR}}/share/{prj} RENAME copyright)""" |
| 75 | +file(INSTALL |
| 76 | + ${{SOURCE_PATH}}/{lic} DESTINATION ${{CURRENT_PACKAGES_DIR}}/share/${{PORT}} RENAME copyright |
| 77 | +)""" |
58 | 78 |
|
59 | 79 | tpl_vcpkg_note_sha =\ |
60 | 80 | """ |
@@ -114,7 +134,7 @@ def createControl( args ): |
114 | 134 | def createPortfile( args ): |
115 | 135 | """Create vcpkg portfile""" |
116 | 136 | output = tpl_vcpkg_portfile.format( |
117 | | - usr=args.user, prj=args.project, ref=to_ref(args.version), sha=args.sha, lic=cfg_license ) |
| 137 | + optpfx=cfg_cmake_optpfx, usr=args.user, prj=args.project, ref=to_ref(args.version), sha=args.sha, lic=cfg_license ) |
118 | 138 | if args.verbose: |
119 | 139 | print( "Creating portfile '{f}':".format( f=portfile_path( args ) ) ) |
120 | 140 | if args.verbose > 1: |
|
0 commit comments