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

Wrong library name #15

Closed
Pro opened this issue Nov 4, 2019 · 0 comments · Fixed by #16
Closed

Wrong library name #15

Pro opened this issue Nov 4, 2019 · 0 comments · Fixed by #16

Comments

@Pro
Copy link
Contributor

Pro commented Nov 4, 2019

Is it on purpose that you are using ${CMAKE_SOURCE_DIR} to define the project name, and with this the name of the library?

https://github.com/mpromonet/libv4l2cpp/blob/f32a7cd2218860bed1783db110dd556a0e9
4eaa1/CMakeLists.txt#L4

e.g. if I have a project:

some-stuff-dir
 |- deps
     |- libv4l2cpp (git submodule pointing to github/libv4l2cpp)
 |- CMakeLists.txt

with the content:

cmake_minimum_required(VERSION 3.2)


project(some-stuff)

add_subdirectory(deps/libv4l2cpp)

The resulting library name for libv4l2cpp would be some-stuff-dir

Wouldn't it be better to use:

get_filename_component(BASENAME ${CMAKE_CURRENT_LIST_DIR} NAME)

Then the resulting lib name is libv4l2cpp.

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