Skip to content
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

Update CMakeLists.txt #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Nemirtingas
Copy link

Fixes #16

@janbar
Copy link
Owner

janbar commented Feb 25, 2022

crypto is not linked with these libs. Probably your parent project is.

@janbar janbar closed this Feb 25, 2022
@Nemirtingas
Copy link
Author

Nemirtingas commented Feb 25, 2022

I don't even know what you are talking about. crypto is the name of the library currently being built in your cmake file:
https://github.com/janbar/openssl-cmake/blob/master/crypto/CMakeLists.txt#L286

I added user32 advapi32 because thoses are default libraries added by CMake that can be disabled, thats why I had to add them manually.

@janbar janbar reopened this Mar 2, 2022
@janbar
Copy link
Owner

janbar commented Mar 2, 2022

I haven't skills with windows platform. So what could disable those default link ?

@Nemirtingas
Copy link
Author

When you want to remove unecessary dependencies linked to you library/exec.
CMake uses theses libraries as default linked libraries:

-- CMAKE_CXX_STANDARD_LIBRARIES_INIT=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -loldnames
-- CMAKE_C_STANDARD_LIBRARIES_INIT=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -loldnames

I have a toolchain that cross-compiles on Linux for Windows using the MSVC standard library, not mingw. It also allows me to link against use the newer libraries mincore.lib and WindowsApp.lib that are used for UWP apps.
mincore and WindowsApp link to the new versionned interfaces like

api-ms-win-core-file-l1-1-0.dll
api-ms-win-core-handle-l1-1-0.dll
api-ms-win-core-errorhandling-l1-1-0.dll
api-ms-win-core-heap-l1-1-0.dll
api-ms-win-core-io-l1-1-0.dll
api-ms-win-core-synch-l1-1-0.dll 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing Windows libs if not enabling default libs
2 participants