From 87c9b932ff4f5a1014388b47e40d515e8b576f2a Mon Sep 17 00:00:00 2001 From: lukas Date: Mon, 15 Mar 2021 20:45:31 +0100 Subject: [PATCH] delete some toolchain cmake parts install perl within docker container -- dependency of libssl --- CMakeLists.txt | 43 ----------------------------------- Docker/Windows_Conan/build.sh | 2 +- 2 files changed, 1 insertion(+), 44 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f826fe..ecab293 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,33 +38,6 @@ if (${WinBuild}) set(CMAKE_SYSTEM_NAME WindowsStore) set(CMAKE_SYSTEM_VERSION 10.0) - set(TOOLCHAIN_PREFIX x86_64-w64-mingw32) # x64 build toolchain - #set(TOOLCHAIN_PREFIX i686-w64-mingw32) - - # cross compilers to use for C and C++ - set(CMAKE_C_COMPILER /usr/bin/${TOOLCHAIN_PREFIX}-gcc) - set(CMAKE_CXX_COMPILER /usr/bin/${TOOLCHAIN_PREFIX}-g++) - set(CMAKE_RC_COMPILER /usr/bin/${TOOLCHAIN_PREFIX}-windres) - - # target environment on the build host system - set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX}) - - - # modify default behavior of FIND_XXX() commands to - # search for headers/libs in the target environment and - # search for programs in the build host environment - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) - - set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CSS_STANDARD_LIBRARIES}") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") - # currently libs are dynamically linked eg. dlls have to be copied to same folder - # todo link dynamically. - # maybe so: set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++ -static") - # or set(CMAKE_CXX_STANDARD_LIBRARIES -lcurl -lpthread -static-libgcc -static-libstdc++ -lcrypto -lssl -lws2_32 -static -DCURL_STATICLIB) - # or add_definitions(-DCURL_STATICLIB) # windows config path is in %appdata% folder of user set(CONFIG_PATH "std::string(std::getenv(\"USERPROFILE\")) + \"\\\\AppData\\\\Roaming\\\\DynuIPrefresher\\\\\"") @@ -172,22 +145,6 @@ ELSE () TARGETS ${Application_Name} DESTINATION . COMPONENT ${Application_Name}) - - # install .dll dependencies - # todo check if files exist... - SET(LIBBINARYPATH "/usr/${TOOLCHAIN_PREFIX}/sys-root/mingw/bin") - install(FILES /usr/${TOOLCHAIN_PREFIX}/sys-root/mingw/bin/libcurl-4.dll - ${LIBBINARYPATH}/libssh2-1.dll - ${LIBBINARYPATH}/libstdc++-6.dll - ${LIBBINARYPATH}/libgcc_s_seh-1.dll - ${LIBBINARYPATH}/libcrypto-1_1-x64.dll - ${LIBBINARYPATH}/libssl-1_1-x64.dll - ${LIBBINARYPATH}/libwinpthread-1.dll - ${LIBBINARYPATH}/zlib1.dll - ${LIBBINARYPATH}/libidn2-0.dll - ${LIBBINARYPATH}/libconfig++-11.dll - DESTINATION . - COMPONENT ${Application_Name}) ENDIF () if (${PACKAGING}) diff --git a/Docker/Windows_Conan/build.sh b/Docker/Windows_Conan/build.sh index a4e1bea..6fae09a 100644 --- a/Docker/Windows_Conan/build.sh +++ b/Docker/Windows_Conan/build.sh @@ -2,7 +2,7 @@ # Install texlive echo "instaling cmake" && \ -dnf install -y mingw64-gcc-c++ cmake make mingw32-nsis gtest gtest-devel python3 python3-pip git +dnf install -y mingw64-gcc-c++ cmake make mingw32-nsis gtest gtest-devel python3 python3-pip git perl #cleanup dnf clean dbcache && dnf clean packages