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

In cmake on Windows, explicitly specifying the library extension should work #53

Closed
mmomtchev opened this issue Oct 7, 2024 · 0 comments · Fixed by #54
Closed

In cmake on Windows, explicitly specifying the library extension should work #53

mmomtchev opened this issue Oct 7, 2024 · 0 comments · Fixed by #54

Comments

@mmomtchev
Copy link
Owner

Describe the bug
Specifying shell32.lib as a library works with CMake on Windows

To Reproduce

project('cmake_install_files', ['c', 'cpp'])

cm = import('cmake')

cm_opts = cm.subproject_options()
sub_pro = cm.subproject('subproj', options: cm_opts)

prefix = get_option('prefix')

explicit_libs = sub_pro.dependency('explicit_libs')
exe1 = executable('main', ['main.cpp'], dependencies: [explicit_libs])
test('test1', exe1)
cmake_minimum_required(VERSION 3.5)

project(subdir)

set (CMAKE_CXX_STANDARD 14)

add_library(explicit_libs INTERFACE)

if(WIN32)
  target_link_libraries(explicit_libs INTERFACE shell32.lib)
endif()

Expected behavior
Do not add shell32.lib.lib as library

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 a pull request may close this issue.

1 participant