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

Don't use absolute path as install destination in CMakeLists.txt #13

Closed
db-tech opened this issue May 7, 2021 · 3 comments
Closed

Don't use absolute path as install destination in CMakeLists.txt #13

db-tech opened this issue May 7, 2021 · 3 comments
Labels
feature New feature

Comments

@db-tech
Copy link

db-tech commented May 7, 2021

I would recommend not using absolute paths as install destination like those:

 install(TARGETS uvgrtp
                ARCHIVE
                DESTINATION /usr/local/lib
        )

    install(DIRECTORY include/ DESTINATION /usr/local/include/uvgrtp
            FILES_MATCHING PATTERN "*.hh"
    )

Maye you could use something like this ?:

# Define install target, install libraries and archives (static libraries) to "<prefix>/lib"
install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets
        LIBRARY DESTINATION lib
        ARCHIVE DESTINATION lib
        INCLUDES DESTINATION include)

#Copy all header files to the <prefix>/include/<projectName> directory with subdirectories retained
install(DIRECTORY ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}
        DESTINATION include
        FILES_MATCHING PATTERN "*.hh")
@altonen
Copy link
Collaborator

altonen commented May 13, 2021

Hi,

please open a pull request, I can test it at some point and give it LGMT.

@db-tech
Copy link
Author

db-tech commented May 14, 2021

K, will do that when I have the time.

@jrsnen
Copy link
Member

jrsnen commented Jun 16, 2021

Merged with #44

@jrsnen jrsnen closed this as completed Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

3 participants