diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ac8f88e3..b395be18b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,8 +38,9 @@ if(MINGW) CACHE STRING "Version of GCC in your MinGW installation") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format -Wno-format-extra-args") - set(CMAKE_CXX_STANDARD_LIBRARIES "-static -lwsock32 -lws2_32 ${CMAKE_CSS_STANDARD_LIBRARIES}") - + # Linking mingw libs statically + set(CMAKE_CXX_STANDARD_LIBRARIES "-Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive, -static-libgcc -static-libstdc++ -lwsock32 -lws2_32 ${CMAKE_CSS_STANDARD_LIBRARIES}") + # Check for gcc target architecture execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE GCC_ARCH) string(STRIP "${GCC_ARCH}" GCC_ARCH_TRIPLE) diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..de76743f0 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,54 @@ +version: 2.0.0-beta.1-{branch}+{build} +image: Visual Studio 2015 +environment: + BOOST_ROOT: C:\Libraries\boost_1_65_1 + +install: + - 'git submodule update --init' + - ps: '$env:path = $env:path.replace("C:\Program Files\Git\usr\bin;", "")' + - ps: '$env:path = "C:\msys64\mingw64\bin;C:\msys64\usr\bin\;" + $env:path' + +build_script: + + # uninstall tcl/tk + - pacman -Rdd --noconfirm mingw-w64-x86_64-tcl mingw-w64-x86_64-tk + + # build tcl + - cd C:\projects + - wget -O tcl-release.tar.gz https://github.com/tcltk/tcl/archive/release.tar.gz + - tar xf tcl-release.tar.gz + - cd tcl-release/win/ + - bash configure --enable-threads --enable-64bit --prefix=C:/tcltk/ + - make + - make install + + # build tk + - cd C:\projects + - wget -O tk-release.tar.gz https://github.com/tcltk/tk/archive/release.tar.gz + - tar xf tk-release.tar.gz + - cd tk-release/win/ + - bash configure --enable-64bit --prefix=C:/tcltk/ --with-tcl=../../tcl-release/win/ + - make + - make install + + # build boost + - cd %BOOST_ROOT% + - call bootstrap.bat gcc + - cat bootstrap.log + - .\b2 toolset=gcc variant=release --with-thread --with-system --with-random --with-filesystem --with-program_options + + # install emacs + # We cannot use $(pacman -S *-emacs because ISS packs C:/.../emacs.exe/../* which would include all of msys) + - choco install emacs64 + + # build mozart2 + - mkdir C:\projects\mozart2\build + - cd C:\projects\mozart2\build + - cmake -DCMAKE_BUILD_TYPE=Release -G"MSYS Makefiles" -DCMAKE_PREFIX_PATH=C:/tcltk -DBOOST_ROOT="%BOOST_ROOT%" -DISS_INCLUDE_TCL=ON -DISS_INCLUDE_EMACS=ON C:\projects\mozart2 + - make check || true + - cmake --build . --target installer -- VERBOSE=1 + +artifacts: + - path: build\mozart2-2.0.0-beta.1-x86_64-windows.exe + name: binary installer + diff --git a/vm/boostenv/main/CMakeLists.txt b/vm/boostenv/main/CMakeLists.txt index f3a8ddcad..79d2c6a79 100644 --- a/vm/boostenv/main/CMakeLists.txt +++ b/vm/boostenv/main/CMakeLists.txt @@ -116,3 +116,8 @@ include_directories(${GENERATED_BOOSTSOURCES_DIR}) add_library(mozartvmboost boostvm.cc boostenvmodules.cc) add_dependencies(mozartvmboost genboostsources) + +# We add bcrypt lib(dynamically) for Windows +if(WIN32) + target_link_libraries(mozartvmboost bcrypt) +endif()