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

minor question about cmake on ubuntu 20.04 #11

Open
VisualFox opened this issue May 24, 2021 · 0 comments
Open

minor question about cmake on ubuntu 20.04 #11

VisualFox opened this issue May 24, 2021 · 0 comments

Comments

@VisualFox
Copy link

VisualFox commented May 24, 2021

Hi, First thank you so much for this great library, I am really thankful for your hard work.

I encountering some minor issue when I try to compile and install the static library. I am following this installation guide: http://tatsy.github.io/lime/install.html
disclaimer: I am not familiar at all with cmake so I may have over looked something really obvious

a) in CMakeLists.txt find package is requiring version 3.x of OpenCV but I was trying to compile it against 4.x. Changing it to find_package(OpenCV 4.0 REQUIRED) resolve the issue but it's not ideal. Maybe it will be better to don't specify the OpenCV version? and just use find_package(OpenCV REQUIRED) instead?

b) This one is more odd but when running make install, the installation was falling due to 'EXPORT' and 'LimeTargets' being handled as file. It turn out that inside the cmake install files directive 'EXPORT LimeTargets' is interpreted as two files on my system.

CMake Error at sources/cmake_install.cmake:41 (file): file INSTALL cannot find "/home/xxx/xxx/lime/sources/EXPORT": No such file or directory.

I was able to resolve the issue by removing 'EXPORT LimeTargets' in these two places:

  • cmake/Macros.cmake in function(add_folder SOURCES FOLDER_NAME)

from

if (add_folder_INSTALL) message(STATUS "Install \"${FOLDER_NAME}\"") install(FILES ${LOCAL_FILES} EXPORT LimeTargets DESTINATION "include/${FOLDER_NAME}") endif()

to

if (add_folder_INSTALL) message(STATUS "Install \"${FOLDER_NAME}\"") install(FILES ${LOCAL_FILES} DESTINATION "include/${FOLDER_NAME}") endif()

  • sources/CMakeList.txt

from

install(FILES lime.hpp EXPORT LimeTargets DESTINATION include)

to

install(FILES lime.hpp DESTINATION include)

Let me know if you want a pull request for these two changes

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

No branches or pull requests

1 participant