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

Add install option for cmake #622

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

Add install option for cmake #622

wants to merge 1 commit into from

Conversation

rainhard
Copy link

copy include & libs to install directory

@CLAassistant
Copy link

CLAassistant commented Nov 21, 2024

CLA assistant check
All committers have signed the CLA.

)
add_dependencies(copy_includes photon_static)

install(DIRECTORY ${CMAKE_BINARY_DIR}/include/ DESTINATION include)
Copy link
Collaborator

@beef9999 beef9999 Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
install(DIRECTORY ${CMAKE_BINARY_DIR}/include/ DESTINATION include)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include)
install(FILES ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libphoton.a DESTINATION lib)
install(PROGRAMS ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libphoton.so DESTINATION lib)

Copy link
Collaborator

@beef9999 beef9999 Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we don't need to copy include dir to build dir? So the copy_includes target is not necessary.

And those depentent static libs have been --whole-archiveed into libphoton.so, so you can just specify the so file to install.

The PROGRAMS is to keep file's executable permissions

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.

3 participants