-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
CMake Build scripts and MSVC support #2045
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
generate config.h Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
aria2c now compiles under cmake (atleast under linux) Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
pullin the CRT equivalents for some things ensure gai_strerror and getaddrinfo play nice
- MSVC needs a return value even with unreachable code
properly deal with extraldflags Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
checking for c functions with check_cxx_* can cause check to fail do to overloads
add static lib target Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
fix: set proper include dirs for static target fix: cache all needed build vars so that a reconfig doesn't lose them
Hello, I built using cmake in Visual Studio, but unfortunately, it did not compile properly. The following error appears to be missing cx11_ Override.cc file: |
this appears to be a problem with your cmake install or your file permissions. the relevant lines in the cmake list message(STATUS "Checking whether the C++ compiler supports `override` keyword")
set(_tmp_src
"\
struct Base {
virtual void f() = 0;
};
struct Derived : Base {
virtual void f() override {}
};
int main(int argc, char* argv[]) {
Derived x;
}
")
try_compile(CXX11_OVERRIDE
SOURCE_FROM_VAR cx11_override.cc _tmp_src
)
unset(_tmp_src) writes the file you can pass --debug-trycompile to cmake to debug why that is failing |
Windows10 LSTC2019 : libgnutls libxml2 ...等几个依赖库 怎么配置 才能成功编译? |
cmake生成sln的目录有个 config.h 你需要修改它
我只在win使用 ,我自己选择的依赖库为libssh2,libcares,libexpat,zlib,sqlite3(这个就2文件我就直接添加到项目里了,没有使用静态lib或者dll) 所以 我在config.h末尾添加以下内容即可构建成功
#define HAVE_LIBSSH2 1
#define HAVE_LIBCARES 1
#define HAVE_SQLITE3 1
#define HAVE_LIBEXPAT 1
#define HAVE_ZLIB 1
#define ENABLE_SSL 1
#define HAVE_WINTLS 1
#define SECURITY_WIN32 1
#pragma comment(lib, "Crypt32.lib")
#pragma comment(lib, "Secur32.lib")
…------------------ 原始邮件 ------------------
发件人: "aria2/aria2" ***@***.***>;
发送时间: 2024年5月16日(星期四) 下午3:37
***@***.***>;
***@***.******@***.***>;
主题: Re: [aria2/aria2] CMake Build scripts and MSVC support (PR #2045)
image.png (view on web)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
This PR adds CMake build scripts that mostly mirror the existing autotools build system.
It also contains some patches to support building under MSVC which was the reason the CMake build system was necessary.
This PR is initially marked as Draft because the build scripts could use some polishing. additionally they need testing across multiple systems and configurations to really validate their correctness.
For now I've tested them under Linux and windows 11 in a VM