File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ include = [
3333 " libprojectM/**/*.h" ,
3434 " libprojectM/**/*.hpp" ,
3535 " libprojectM/config*" ,
36+ " libprojectM/vcpkg*" ,
3637 " bindgen/**" ,
3738]
3839
Original file line number Diff line number Diff line change @@ -33,7 +33,24 @@ fn main() {
3333
3434 // Platform-specific configurations
3535 if cfg ! ( target_os = "windows" ) {
36- // Windows-specific configurations (if any)
36+ let vcpkg_root = match env:: var ( "VCPKG_INSTALLATION_ROOT" ) {
37+ Ok ( val) => val,
38+ Err ( _) => {
39+ println ! ( "cargo:warning=VCPKG_INSTALLATION_ROOT is not set. Please set it to your VCPKG installation directory." ) ;
40+ std:: process:: exit ( 1 ) ;
41+ }
42+ } ;
43+ cmake_config
44+ . generator ( "Visual Studio 17 2022" )
45+ . define (
46+ "CMAKE_TOOLCHAIN_FILE" ,
47+ format ! ( "{}/scripts/buildsystems/vcpkg.cmake" , vcpkg_root) ,
48+ )
49+ . define ( "VCPKG_TARGET_TRIPLET" , "x64-windows-static-md" )
50+ . define (
51+ "CMAKE_MSVC_RUNTIME_LIBRARY" ,
52+ "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL" ,
53+ ) ;
3754 } else if cfg ! ( target_os = "emscripten" ) {
3855 cmake_config. define ( "ENABLE_EMSCRIPTEN" , "ON" ) ;
3956 }
You can’t perform that action at this time.
0 commit comments