File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7272 restore-keys : |
7373 vcpkg-${{ matrix.os }}-${{ matrix.arch }}-
7474
75+ - name : Setup MSVC (Windows)
76+ if : matrix.os == 'windows'
77+ uses : ilammy/msvc-dev-cmd@v1
78+ with :
79+ arch : ${{ matrix.arch }}
80+
7581 - name : Setup vcpkg cache (Windows)
7682 if : matrix.os == 'windows'
7783 uses : actions/cache@v4
Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.10 )
2+
3+ if (VCPKG_TARGET_TRIPLET MATCHES "^x86-" )
4+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "" FORCE )
5+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "" FORCE )
6+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32" CACHE STRING "" FORCE )
7+ set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32" CACHE STRING "" FORCE )
8+ endif ()
9+
210project (gwsockets)
311add_subdirectory (GmodLUA )
412
@@ -23,10 +31,6 @@ if(WIN32)
2331 target_compile_definitions (gwsockets PRIVATE WIN32 GMMODULE BOOST_ALL_NO_LIB NDEBUG )
2432else ()
2533 target_compile_definitions (gwsockets PRIVATE LINUX GMMODULE BOOST_ALL_NO_LIB NDEBUG )
26- if (VCPKG_TARGET_TRIPLET MATCHES "^x86-" )
27- target_compile_options (gwsockets PRIVATE -m32 )
28- target_link_options (gwsockets PRIVATE -m32 )
29- endif ()
3034endif ()
3135
3236# Link with OpenSSL and Boost from vcpkg
Original file line number Diff line number Diff line change 1717 "inherits" : " vcpkg-base" ,
1818 "generator" : " Ninja" ,
1919 "binaryDir" : " ${sourceDir}/cmake-build-x86-release" ,
20+ "architecture" : {
21+ "value" : " x86" ,
22+ "strategy" : " external"
23+ },
2024 "cacheVariables" : {
2125 "CMAKE_BUILD_TYPE" : " RelWithDebInfo" ,
2226 "VCPKG_TARGET_TRIPLET" : " x86-windows-static"
3337 "inherits" : " vcpkg-base" ,
3438 "generator" : " Ninja" ,
3539 "binaryDir" : " ${sourceDir}/cmake-build-x64-release" ,
40+ "architecture" : {
41+ "value" : " x64" ,
42+ "strategy" : " external"
43+ },
3644 "cacheVariables" : {
3745 "CMAKE_BUILD_TYPE" : " RelWithDebInfo" ,
3846 "VCPKG_TARGET_TRIPLET" : " x64-windows-static"
5058 "binaryDir" : " ${sourceDir}/cmake-build-x86-release" ,
5159 "cacheVariables" : {
5260 "CMAKE_BUILD_TYPE" : " RelWithDebInfo" ,
53- "VCPKG_TARGET_TRIPLET" : " x86-linux"
61+ "VCPKG_TARGET_TRIPLET" : " x86-linux-static "
5462 },
5563 "condition" : {
5664 "type" : " equals" ,
6573 "binaryDir" : " ${sourceDir}/cmake-build-x64-release" ,
6674 "cacheVariables" : {
6775 "CMAKE_BUILD_TYPE" : " RelWithDebInfo" ,
68- "VCPKG_TARGET_TRIPLET" : " x64-linux"
76+ "VCPKG_TARGET_TRIPLET" : " x64-linux-static "
6977 },
7078 "condition" : {
7179 "type" : " equals" ,
You can’t perform that action at this time.
0 commit comments