Enable 64 bit static build and fix linker error

This commit is contained in:
Twan van Laarhoven
2020-05-11 01:54:21 +02:00
parent 9562103f7e
commit b57d9b7615
3 changed files with 16 additions and 0 deletions
+12
View File
@@ -59,6 +59,18 @@
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x86" ],
"variables": []
},
{
"name": "x64-Release-static",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows-static",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": []
}
]
}
+3
View File
@@ -23,14 +23,17 @@ vcpkg install wxwidgets
vcpkg install boost-smart-ptr
vcpkg install boost-regex
vcpkg install boost-logic
vcpkg install boost-pool
vcpkg install hunspell
vcpkg integrate install
````
* Then just use "Open Folder" from inside visual studio to open the Magic Set Editor source code root folder.
* Select the configuration that you want to build, and hit F7.
Notes:
* You may need to work around [this bug](https://github.com/microsoft/vcpkg/issues/4756) by replacing `$VCPATH\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.16\Modules\FindwxWidgets.cmake` with the file from https://github.com/CaeruleusAqua/vcpkg-wx-find (`$VCPATH` is usually `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7`)
* vcpkg by default installs 32 bit versions of libraries, use `vcpkg install PACKAGENAME:x64-windows` if you want to enable a 64 bit build.
* Similarly, to use a static build, use `vcpkg install PACKAGENAME:x32-windows-static`.
For running tests you will also need to
* Download and install perl (For example [Strawberry perl](http://strawberryperl.com/) or using [MSYS2](https://www.msys2.org/))
+1
View File
@@ -20,6 +20,7 @@ using boost::tribool;
template <> void GetDefaultMember::handle(const String& v) { value = to_script(v); }
template <> void GetDefaultMember::handle(const int& v) { value = to_script(v); }
template <> void GetDefaultMember::handle(const unsigned int& v) { value = to_script((int)v); }
template <> void GetDefaultMember::handle(const uint64_t& v) { value = to_script((int)v); }
template <> void GetDefaultMember::handle(const double& v) { value = to_script(v); }
template <> void GetDefaultMember::handle(const bool& v) { value = to_script(v); }
template <> void GetDefaultMember::handle(const tribool& v) { value = to_script((bool)v); }