JBarberU
JBarberU

Reputation: 1029

Building Poco C++ libraries on Windows from commandline

I've developed a python script for building a bunch of dependencies that I need for my project. Among them is Poco.

On OS X and Linux I'm using cmake to build Poco and my first thought was to do the same for Windows. It seems, however, that the cmake pipeline isn't supported on Windows (or I'm doing something wrong) which leads me to my question; how do I go about building Poco for windows from the commandline?

Upvotes: 0

Views: 4803

Answers (1)

doqtor
doqtor

Reputation: 8484

For Windows you will find preconfigured scrips for building POCO using specific VS compiler version i.e. build_vs120.cmd or generic one buildwin.cmd which you can configure according to what you need:

C:\dev\workspace\poco-1.6.0>buildwin.cmd
Usage:
------
buildwin VS_VERSION [ACTION] [LINKMODE] [CONFIGURATION] [PLATFORM] [SAMPLES] [TESTS] [TOOL]
VS_VERSION:    "90|100|110|120"
ACTION:        "build|rebuild|clean"
LINKMODE:      "static_mt|static_md|shared|all"
CONFIGURATION: "release|debug|both"
PLATFORM:      "Win32|x64|WinCE|WEC2013"
SAMPLES:       "samples|nosamples"
TESTS:         "tests|notests"
TOOL:          "devenv|vcexpress|wdexpress|msbuild"

Default is build all.

NOTE: You may need to download sources for Windows

Edit: There doesn't seem to be an install equivalent on Windows for when using the build batch script. In order to mimic linux install, one needs to merge all include folders into one, so basically copy include folders from Foundation, JSON, Net, Util, XML, and so on into one location by overwriting them. All folders except Foundation which is a Poco core namespace have structure: {Name}/include/Poco/{Name}, i.e. Util/include/Poco/Util so they will merge without any problem. As a result one should get the following structure: include/Poco/* This should be easy to scriptize too.

Upvotes: 3

Related Questions