Advertisement
Combreal

Cmake_Compilation_on_Windows

Jul 16th, 2018
413
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.01 KB | None | 0 0
  1. Setup-SSH compilation on Windows with CMake
  2.  
  3. -----------------------------------------------------------------------------------------------------------------
  4. Download and install Git
  5. https://git-scm.com/download/win
  6.  
  7. Download and install CMake
  8. https://cmake.org/files/v3.12/cmake-3.12.0-rc3-win64-x64.msi
  9.  
  10. Download and install MSYS 1
  11. https://netix.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/msys-1.0.11/MSYS-1.0.11.exe
  12.  
  13. Download and install MinGW64
  14. https://sourceforge.net/projects/mingw-w64/files/latest/download
  15.  
  16. Download the exe and the 2 libraries from there :
  17. http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.26-1_win32.zip
  18. http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip
  19. http://ftp.acc.umu.se/pub/gnome/binaries/win32/glib/2.28/glib_2.28.8-1_win32.zip
  20. put them all to C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin
  21.  
  22. Download and extract the archive http://gnuwin32.sourceforge.net/downlinks/libintl.php
  23. and put the libraries to C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\lib
  24.  
  25. Download and extract the Gtk bundle :
  26. http://www.tarnyko.net/repo/gtk3_build_system/gtk+-bundle_3.6.4-20130513_win32.zip or
  27. http://www.tarnyko.net/repo/gtk3_build_system/gtk+-bundle_3.6.4-20130513_win64.zip
  28.  
  29. For Setup-SSh download, extract and compile libcurl with the following commands (see libcurl_source\docs\INSTALL for more info) :
  30. https://curl.haxx.se/download/curl-7.61.0.zip
  31. "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat" or
  32. "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
  33. cd C:\curl-7.21.7_x64\winbuild
  34. nmake /f Makefile.vc mode=dll DEBUG=no MACHINE=x32 USE_IPV6=no USE_SSL=no USE_SSH2=no or
  35. nmake /f Makefile.vc mode=dll DEBUG=no MACHINE=x64 USE_IPV6=no USE_SSL=no USE_SSH2=no
  36. Generated files in C:\curl-7.21.7_x64\builds\bin include & lib
  37.  
  38. Add the following paths to the environment variable PATH:
  39. C:\Program Files\CMake\bin
  40. C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin
  41. C:\msys\1.0\bin
  42. C:\GTK\bin or C:\gtk_win64\bin
  43.  
  44. Create the system environment variable PKG_CONFIG_PATH
  45. with the value egual to C:\GTK\lib\pkgconfig or C:\gtk_win64\lib\pkgconfig
  46.  
  47. Logoff and back on to apply the changes
  48.  
  49. Navigate to the place where you want to make your project and enter the following command
  50. git clone https://gitlab.inria.fr/mjolly/Setup-SSH or
  51. git clone https://gitlab.inria.fr/mjolly/autofeedkey or
  52. git clone https://gitlab.inria.fr/mjolly/Backup-Conf
  53.  
  54. Then create a sub-folder called build and navigate to the build folder and type the following commands
  55. cmake .. -G "MSYS Makefiles"
  56. mingw32-make
  57.  
  58. And finally put all the dynamic libraries from c:\GTK\bin or C:\gtk_win64\bin and the one from c:\CURL\bin (if needed) next to the compiled executable
  59.  
  60. -----------------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement