diff --git a/cmake/PostBuild.cmake b/cmake/PostBuild.cmake deleted file mode 100644 index 53a2cd697d..0000000000 --- a/cmake/PostBuild.cmake +++ /dev/null @@ -1,19 +0,0 @@ -string(ASCII 27 Esc) -set(ColourReset "${Esc}[m") -set(ColourBold "${Esc}[1m") -set(Red "${Esc}[31m") -set(Green "${Esc}[32m") -set(Yellow "${Esc}[33m") -set(Blue "${Esc}[34m") -set(Magenta "${Esc}[35m") -set(Cyan "${Esc}[36m") -set(White "${Esc}[37m") -set(BoldRed "${Esc}[1;31m") -set(BoldGreen "${Esc}[1;32m") -set(BoldYellow "${Esc}[1;33m") -set(BoldBlue "${Esc}[1;34m") -set(BoldMagenta "${Esc}[1;35m") -set(BoldCyan "${Esc}[1;36m") -set(BoldWhite "${Esc}[1;37m") - -message("Type ${Green}sudo make install${ColourReset} to install D++") diff --git a/cmake/Raw-Files/Bottom-Of-Portfile.cmake b/cmake/Raw-Files/Bottom-Of-Portfile.cmake deleted file mode 100644 index 9370e0ce83..0000000000 --- a/cmake/Raw-Files/Bottom-Of-Portfile.cmake +++ /dev/null @@ -1,27 +0,0 @@ - HEAD_REF master -) - -vcpkg_cmake_configure( - SOURCE_PATH "${SOURCE_PATH}" - DISABLE_PARALLEL_CONFIGURE -) - -vcpkg_cmake_install() - -vcpkg_cmake_config_fixup(NO_PREFIX_CORRECTION) - -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share/dpp") -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") -endif() - -file( - INSTALL "${SOURCE_PATH}/LICENSE" - DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" - RENAME copyright -) - -file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") - diff --git a/cmake/Raw-Files/Bottom-Of-Version-File.txt b/cmake/Raw-Files/Bottom-Of-Version-File.txt deleted file mode 100644 index 7dcd4b2f7f..0000000000 --- a/cmake/Raw-Files/Bottom-Of-Version-File.txt +++ /dev/null @@ -1,22 +0,0 @@ -, - "description": "D++ Extremely Lightweight C++ Discord Library.", - "homepage": "https://dpp.dev/", - "license": "Apache-2.0", - "supports": "((windows & !static & !uwp) | linux | osx)", - "dependencies": [ - "libsodium", - "nlohmann-json", - "openssl", - "opus", - "zlib", - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - } - ] -} - diff --git a/cmake/Raw-Files/Middle-Of-Portfile.cmake b/cmake/Raw-Files/Middle-Of-Portfile.cmake deleted file mode 100644 index c247d094c7..0000000000 --- a/cmake/Raw-Files/Middle-Of-Portfile.cmake +++ /dev/null @@ -1 +0,0 @@ - SHA512 \ No newline at end of file diff --git a/cmake/Raw-Files/Top-Of-Portfile.cmake b/cmake/Raw-Files/Top-Of-Portfile.cmake deleted file mode 100644 index 14af0e293b..0000000000 --- a/cmake/Raw-Files/Top-Of-Portfile.cmake +++ /dev/null @@ -1,4 +0,0 @@ -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO brainboxdotcc/DPP - REF \ No newline at end of file diff --git a/cmake/Raw-Files/Top-Of-Version-File.txt b/cmake/Raw-Files/Top-Of-Version-File.txt deleted file mode 100644 index 637a1eb43e..0000000000 --- a/cmake/Raw-Files/Top-Of-Version-File.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name": "dpp", - "version": \ No newline at end of file diff --git a/library-vcpkg/CMakeLists.txt b/library-vcpkg/CMakeLists.txt index ca6c43ebea..06bd7e6076 100644 --- a/library-vcpkg/CMakeLists.txt +++ b/library-vcpkg/CMakeLists.txt @@ -13,7 +13,6 @@ add_library("${PROJECT_NAME}::${LIB_NAME}" ALIAS "${LIB_NAME}") if(${AVX_TYPE} STREQUAL "OFF") include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/DetectArchitecture.cmake") - message("--- AVX type: ${AVX_TYPE}") else() message("-- AVX type overridden by configuration: ${AVX_TYPE}") endif() @@ -26,12 +25,13 @@ target_compile_definitions( "DPP_BUILD" ) -add_compile_definitions(OPENSSL_SYS_WIN32) -add_compile_definitions(_WINSOCK_DEPRECATED_NO_WARNINGS) -add_compile_definitions(WIN32_LEAN_AND_MEAN) -add_compile_definitions(_CRT_SECURE_NO_WARNINGS) -add_compile_definitions(_CRT_NONSTDC_NO_DEPRECATE) -add_compile_definitions(T_fallback) +if(WIN32) + add_compile_definitions(OPENSSL_SYS_WIN32) + add_compile_definitions(_WINSOCK_DEPRECATED_NO_WARNINGS) + add_compile_definitions(WIN32_LEAN_AND_MEAN) + add_compile_definitions(_CRT_SECURE_NO_WARNINGS) + add_compile_definitions(_CRT_NONSTDC_NO_DEPRECATE) +endif() target_compile_options( "${LIB_NAME}" PUBLIC diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 00839b0e15..81dd43693f 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -24,7 +24,6 @@ add_compile_definitions(DPP_OS=${CMAKE_SYSTEM_NAME}) if(${AVX_TYPE} STREQUAL "OFF") include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/DetectArchitecture.cmake") - message("--- AVX type: ${AVX_TYPE}") else() message("-- AVX type overridden by configuration: ${AVX_TYPE}") endif() @@ -318,23 +317,23 @@ if(DPP_CORO) " IS_GLIBCXX) if(IS_GLIBCXX) if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.0.0) - message(FATAL_ERROR "Clang with stdc++ and coroutines requires version 12.0.0 or above") + message(FATAL_ERROR "${BoldRed}Clang with stdc++ and coroutines requires version 12.0.0 or above${ColourReset}") endif() message("-- ${Yellow}Detected stdc++ - enabling mock std::experimental namespace${ColourReset}") target_compile_definitions(dpp PUBLIC "STDCORO_GLIBCXX_COMPAT") else() - message("-- ${Yellow}Detected libc++ - using ") + message("-- ${Yellow}Detected libc++ - using ${ColourReset}") if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0.0) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcoroutines-ts") endif() endif() - message("-- ${Yellow}Note - coroutines in clang < 14 are experimental, upgrading is recommended") + message("-- ${Yellow}Note - coroutines in clang < 14 are experimental, upgrading is recommended${ColourReset}") endif() elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0) - message(FATAL_ERROR "Coroutines with g++ require version 10 or above") + message(FATAL_ERROR "${BoldRed}Coroutines with g++ require version 10 or above${ColourReset}") elseif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0) - message("-- ${Yellow}Note - coroutines in g++10 are experimental, upgrading to g++11 or above is recommended") + message("-- ${Yellow}Note - coroutines in g++10 are experimental, upgrading to g++11 or above is recommended${ColourReset}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcoroutines") endif() endif() @@ -406,7 +405,8 @@ if(DPP_INSTALL) install(DIRECTORY ../include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include) endif() - include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/CPackSetup.cmake") # Setup information for packaging and distribution + # Setup information for packaging and distribution + include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/CPackSetup.cmake") # CPack initialization for distribution include(CPack)