use profile to target correct mingw toolchain
This commit is contained in:
		@@ -29,12 +29,12 @@ conan_linux:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
conan_windows:
 | 
					conan_windows:
 | 
				
			||||||
  stage: build
 | 
					  stage: build
 | 
				
			||||||
  image: luki42/dynuiprefresher_build:latest
 | 
					  image: luki42/dynuiprefresher_build:conanbuild
 | 
				
			||||||
  before_script:
 | 
					  before_script:
 | 
				
			||||||
    - conan profile new default --detect --force # Generates default profile detecting GCC and sets old ABI
 | 
					    - conan profile new default --detect --force # Generates default profile detecting GCC and sets old ABI
 | 
				
			||||||
    - conan profile update settings.compiler.libcxx=libstdc++11 default  # Sets libcxx to C++11 ABI
 | 
					    - conan profile update settings.compiler.libcxx=libstdc++11 default  # Sets libcxx to C++11 ABI
 | 
				
			||||||
    - mkdir -p build # create build folder
 | 
					    - mkdir -p build # create build folder
 | 
				
			||||||
    - CONAN_SYSREQUIRES_MODE=enabled CONAN_SYSREQUIRES_SUDO=0 conan install . --build=missing -g cmake -if build
 | 
					    - CONAN_SYSREQUIRES_MODE=enabled CONAN_SYSREQUIRES_SUDO=0 conan install . --build=missing -g cmake -if build --profile ../mingw64.profile
 | 
				
			||||||
  script:
 | 
					  script:
 | 
				
			||||||
    - cmake -S . -B build -D WinBuild=OFF #cmake project
 | 
					    - cmake -S . -B build -D WinBuild=OFF #cmake project
 | 
				
			||||||
    - cd build
 | 
					    - cd build
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										27
									
								
								mingw64.profile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								mingw64.profile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,27 @@
 | 
				
			|||||||
 | 
					toolchain=/usr/x86_64-w64-mingw32 # Adjust this path
 | 
				
			||||||
 | 
					target_host=x86_64-w64-mingw32
 | 
				
			||||||
 | 
					cc_compiler=gcc
 | 
				
			||||||
 | 
					cxx_compiler=g++
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[env]
 | 
				
			||||||
 | 
					CONAN_CMAKE_FIND_ROOT_PATH=$toolchain  # Optional, for CMake to find things in that folder
 | 
				
			||||||
 | 
					CONAN_CMAKE_SYSROOT=$toolchain  # Optional, if we want to define sysroot
 | 
				
			||||||
 | 
					CHOST=$target_host
 | 
				
			||||||
 | 
					AR=$target_host-ar
 | 
				
			||||||
 | 
					AS=$target_host-as
 | 
				
			||||||
 | 
					RANLIB=$target_host-ranlib
 | 
				
			||||||
 | 
					CC=$target_host-$cc_compiler
 | 
				
			||||||
 | 
					CXX=$target_host-$cxx_compiler
 | 
				
			||||||
 | 
					STRIP=$target_host-strip
 | 
				
			||||||
 | 
					RC=$target_host-windres
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[settings]
 | 
				
			||||||
 | 
					# We are cross-building to Windows
 | 
				
			||||||
 | 
					os=Windows
 | 
				
			||||||
 | 
					arch=x86_64
 | 
				
			||||||
 | 
					compiler=gcc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Adjust to the gcc version of your MinGW package
 | 
				
			||||||
 | 
					compiler.version=7.3
 | 
				
			||||||
 | 
					compiler.libcxx=libstdc++11
 | 
				
			||||||
 | 
					build_type=Release
 | 
				
			||||||
		Reference in New Issue
	
	Block a user