From 9d4da515bf361934a12e1a6a6d4b58b369c019be Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Mon, 7 Dec 2020 18:01:10 +0100 Subject: [PATCH] Update angelscript. --- CMakeLists.txt | 10 ++++++++-- CmakeConanSetup.cmake | 1 + conanfile.py | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 750e86c..c0e6465 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,6 +119,9 @@ if (WINDOWS) # -m64: Build a 64 bit library add_compile_options(-m64) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-allow-multiple-definition") + if (SHARED) + set_target_properties(pkmnLib PROPERTIES SUFFIX ".dll") + endif(SHARED) endif (WINDOWS) if (NOT WINDOWS) @@ -127,10 +130,13 @@ endif () if (STATICC) message(STATUS "Linking C library statically") - SET(_LINKS ${_LINKS} -static-libgcc -static-libstdc++) + SET(_LINKS ${_LINKS} -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread) endif() -target_link_libraries(pkmnLib PUBLIC ${_LINKS}) +set(THREADS_PREFER_PTHREAD_FLAG ON) +find_package(Threads REQUIRED) + +target_link_libraries(pkmnLib PUBLIC ${_LINKS} Threads::Threads) if (TESTS) # Create Test executable diff --git a/CmakeConanSetup.cmake b/CmakeConanSetup.cmake index 3b7b36c..295759a 100644 --- a/CmakeConanSetup.cmake +++ b/CmakeConanSetup.cmake @@ -21,6 +21,7 @@ function(SetupConan) else () execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} --install-folder=${CMAKE_BINARY_DIR} --build outdated -s compiler=gcc + -s compiler.version=10.2 -s compiler.libcxx=libstdc++11 -s os=Windows -o *:shared=True diff --git a/conanfile.py b/conanfile.py index fad42fa..474e083 100644 --- a/conanfile.py +++ b/conanfile.py @@ -53,6 +53,6 @@ class PkmnLibConan(ConanFile): self.requires("Arbutils/latest@epsilon/master") self.requires("CreatureLib/latest@epsilon/master") if self.options.script_handler == "angelscript": - self.requires("AngelScript/2.34@AngelScript/Deukhoofd") + self.requires("AngelScript/2.35@AngelScript/Deukhoofd") else: raise ConanInvalidConfiguration("Invalid Script Handler was specified: " + self.options.script_handler) \ No newline at end of file