Code: Select all
cp ..\bin\* .
mkdir build
pushd build
cmake -G "Visual Studio 16 2019" -T v141 -A Win32 -DBUILD_TESTING=On ..
Moderator: Committer
Code: Select all
cp ..\bin\* .
mkdir build
pushd build
cmake -G "Visual Studio 16 2019" -T v141 -A Win32 -DBUILD_TESTING=On ..
Code: Select all
C:\Users\g_top\Desktop\FOSDK11\FreeOrionAlt>cp ..\bin\* .
cp: cannot stat '..bin*': No such file or directory
Yes but also returns back on command popd.
I don't call bootstrap for CMake project.Geoff the Medio wrote: ↑Fri Apr 16, 2021 8:06 amThere is a bin directory in the SDK itself, but it's gone after running bootstrap. Then all the .dll and similar files are moved into the source directory...bin should be appeared after unpacking SDK.
Where am I supposed to run those commands? In ./cmake? It still doesn't work from there, even with a freshly unpacked SDK.o01eg wrote: ↑Fri Apr 16, 2021 2:11 am CMake project needs some preparation:
Code: Select all
cp ..\bin\* . mkdir build pushd build cmake -G "Visual Studio 16 2019" -T v141 -A Win32 -DBUILD_TESTING=On ..
N, it should work from the project root.Geoff the Medio wrote: ↑Fri Apr 16, 2021 10:11 amWhere am I supposed to run those commands? In ./cmake?o01eg wrote: ↑Fri Apr 16, 2021 2:11 am CMake project needs some preparation:
Code: Select all
cp ..\bin\* . mkdir build pushd build cmake -G "Visual Studio 16 2019" -T v141 -A Win32 -DBUILD_TESTING=On ..
What is "the project root"? The SDK root directory? That contains bin directly, so I don't see how ..\bin\* will work.
Code: Select all
CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at
least version "3.5")
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.20/Modules/FindPythonInterp.cmake:169 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:231 (find_package)
I mean FreeOrion project which is suppose to be place in SDK dir.Geoff the Medio wrote: ↑Fri Apr 16, 2021 10:15 amWhat is "the project root"? The SDK root directory? That contains bin directly, so I don't see how ..\bin\* will work.
So if starting from a fresh SDK unpack, I first need to manually check out FreeOrion master, then cd into that directory, which is located in the same SDK root directory as bin...o01eg wrote: ↑Fri Apr 16, 2021 10:34 amI mean FreeOrion project which is suppose to be place in SDK dir.Geoff the Medio wrote: ↑Fri Apr 16, 2021 10:15 amWhat is "the project root"? The SDK root directory? That contains bin directly, so I don't see how ..\bin\* will work.
Yes, I did that:o01eg wrote: ↑Fri Apr 16, 2021 10:51 am Also apply some CMake fixes from: https://github.com/freeorion/freeorion/pull/3409
Code: Select all
CMakeLists.txt | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e22f6a07..84e55ff8b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -402,18 +402,12 @@ target_link_libraries(freeorioncommon
${ANDROID_LIBRARY}
${LOG_LIBRARY}
PRIVATE
+ # boost::uuid requires the bcrypt Windows API on Windows since boost 1.67
+ # see https://github.com/boostorg/uuid/issues/68
+ $<$<AND:$<PLATFORM_ID:Windows>,$<VERSION_GREATER:${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION},1.66>>:bcrypt>
${CORE_FOUNDATION_LIBRARY}
)
-if(WIN32 AND ${Boost_VERSION} GREATER 106699) # boost >= 1.67
- # fix https://github.com/boostorg/uuid/issues/68
- find_library(BCRYPT_LIBRARY bcrypt)
- target_link_libraries(freeorioncommon
- PRIVATE
- ${BCRYPT_LIBRARY}
- )
-endif()
-
if(CMAKE_SYSTEM_NAME MATCHES "Haiku")
target_link_libraries(freeorioncommon PUBLIC network)
endif()
Code: Select all
c:\users\g_top\desktop\fosdk11_godot\freeorion\universe\UnlockableItem.h(10): error C2679: binary '>>': no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion) [C:\Users\g_top\Desktop\FOSDK11_Godot\FreeOrion\build\freeorioncommon.vcxproj]
Code: Select all
CMakeLists.txt | 13 ++++---------
util/OrderSet.h | 1 +
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e22f6a07..8936757bd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -402,18 +402,12 @@ target_link_libraries(freeorioncommon
${ANDROID_LIBRARY}
${LOG_LIBRARY}
PRIVATE
+ # boost::uuid requires the bcrypt Windows API on Windows since boost 1.67
+ # see https://github.com/boostorg/uuid/issues/68
+ $<$<AND:$<PLATFORM_ID:Windows>,$<VERSION_GREATER:${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION},1.66>>:bcrypt>
${CORE_FOUNDATION_LIBRARY}
)
-if(WIN32 AND ${Boost_VERSION} GREATER 106699) # boost >= 1.67
- # fix https://github.com/boostorg/uuid/issues/68
- find_library(BCRYPT_LIBRARY bcrypt)
- target_link_libraries(freeorioncommon
- PRIVATE
- ${BCRYPT_LIBRARY}
- )
-endif()
-
if(CMAKE_SYSTEM_NAME MATCHES "Haiku")
target_link_libraries(freeorioncommon PUBLIC network)
endif()
@@ -462,6 +456,7 @@ target_compile_options(freeorionparseobj
target_compile_definitions(freeorionparseobj
PUBLIC
+ BOOST_ALL_NO_LIB
$<$<NOT:$<PLATFORM_ID:Android>>:BOOST_ALL_DYN_LINK>
PRIVATE
-DNDEBUG
diff --git a/util/OrderSet.h b/util/OrderSet.h
index bb58b4555..1fdf4746f 100644
--- a/util/OrderSet.h
+++ b/util/OrderSet.h
@@ -10,6 +10,7 @@
#include <map>
#include <memory>
#include <set>
+#include <string>
class Order;
Code: Select all
universe\UnlockableItem.h(10): error C2679: binary '>>': no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)