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

Install fbjniLibraryConfig.cmake and headers correctly #76

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@ file(GLOB fbjni_SOURCES
cxx/lyra/*.cpp
)

add_library(fbjni SHARED ${fbjni_SOURCES})
file(GLOB fbjni_HEADERS
cxx/fbjni/*.h
)

file(GLOB fbjni_detail_HEADERS
cxx/fbjni/detail/*.h
)

add_library(fbjni SHARED ${fbjni_SOURCES} ${fbjni_HEADERS})
set_target_properties(fbjni PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)

target_compile_options(fbjni PRIVATE ${FBJNI_COMPILE_OPTIONS})
Expand Down Expand Up @@ -107,9 +115,12 @@ install(TARGETS fbjni EXPORT fbjniLibraryConfig
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) #For windows

install(EXPORT fbjniLibraryConfig DESTINATION share/cmake/fbjni
install(EXPORT fbjniLibraryConfig DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/fbjni
FILE fbjniLibraryConfig.cmake)

install(FILES ${fbjni_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/fbjni)
install(FILES ${fbjni_detail_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/fbjni/detail)

if(MSVC)
install(FILES $<TARGET_PDB_FILE:fbjni> DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL)
install(TARGETS fbjni DESTINATION ${CMAKE_INSTALL_LIBDIR})
Expand Down