Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build freeorioncommon as shared library on Windows with CMake #1416

Open
wants to merge 4 commits into
base: master
from

Conversation

@adrianbroher
Copy link
Contributor

commented Mar 18, 2017

This PR enables building freeorioncommon as a shared library on windows within the CMake build system. This is a work in progress and unfortunately breaks both the current MSVC builds.

If someone wants to test this out please keep the following things in mind:

  • You need to pass the toolset (at least v140_xp or a later one) with the cmake -T parameter to support WindowsXP. When not passing the -T parameter the build will still work but the resulting executable won't be executable on WindowsXP obviously.
  • Use a different build directory than the source directory. The build will probably work if this advice is ignored but I didn't test this variant because it is considered bad style.
  • The build copies the used library DLLs into the build dir and links the default directory automatically to allow an arbitrary build layout with different build configurations. However the build expects the libraries and the python.exe to be located inside a bin which is at the same level as the SDK include and lib directories. If you don't want to copy around files you can establish the same layout by downloading the most recent SDK and not executing the included bootstrap.bat.
@geoffthemedio

This comment has been minimized.

Copy link
Member

commented Mar 19, 2017

Does this effectively just merge parse and common and then make the combination a DLL instead of static library?

@adrianbroher

This comment has been minimized.

Copy link
Contributor Author

commented Mar 19, 2017

Does this effectively just merge parse and common and then make the combination a DLL instead of static library?

Somewhat. common and parse stay different targets (or projects in VS) with different build configurations, but the build artifact is a single dll.

@adrianbroher adrianbroher force-pushed the win-cmake branch 4 times, most recently from 1b14450 to 1a9a0df Mar 19, 2017
@adrianbroher adrianbroher force-pushed the win-cmake branch 2 times, most recently from a7a2865 to f3783c4 Mar 26, 2017
@adrianbroher adrianbroher force-pushed the win-cmake branch from f3783c4 to 36c6c49 Apr 6, 2017
@adrianbroher adrianbroher force-pushed the win-cmake branch from 36c6c49 to f7ff007 Apr 29, 2017
@adrianbroher adrianbroher force-pushed the win-cmake branch 2 times, most recently from e8bf30d to e3d87ca Nov 13, 2017
@adrianbroher

This comment has been minimized.

Copy link
Contributor Author

commented Nov 13, 2017

@LGM-Doyle the Pending::Pending implementation defines a move constructor and a move assign operator. Is there a particular reason why you did not implement the corresponding copy operations? This causes the build to fail for me with the MSVC compiler.

@adrianbroher adrianbroher force-pushed the win-cmake branch 2 times, most recently from 3fc2019 to 3049653 Nov 21, 2017
@LGM-Doyle

This comment has been minimized.

Copy link
Contributor

commented Nov 21, 2017

std::future is not copyable.

I could work on a copyable version next week, if it is preventing this from landing.

@adrianbroher adrianbroher force-pushed the win-cmake branch from 1d96f2f to 3d68c66 May 18, 2018
@adrianbroher adrianbroher modified the milestones: v0.4.8 (optional), post 0.4.8 May 26, 2018
@adrianbroher adrianbroher force-pushed the win-cmake branch 4 times, most recently from 0a93ed7 to 3b6c910 May 26, 2018
@adrianbroher adrianbroher force-pushed the win-cmake branch 4 times, most recently from 10d89bd to 058e6c2 Jun 6, 2018
@adrianbroher adrianbroher force-pushed the win-cmake branch from 058e6c2 to b289020 Jul 7, 2018
@adrianbroher adrianbroher force-pushed the win-cmake branch from b289020 to 6f0187d Jul 24, 2018
@o01eg

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2019

Hi, could you try to rebase it over current master? At least I took one commit to enable CI test.

@Vezzra Vezzra removed this from the Next Release milestone Sep 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.