Commit 41c15526 authored by Johannes Braun's avatar Johannes Braun

Enable cmake export target

parent 2a7f536e
......@@ -14,11 +14,23 @@ file(GLOB_RECURSE SRC_CPP "${PROJECT_SOURCE_DIR}/src/*.cpp")
add_library(glsp ${SRC_CPP})
target_link_libraries(glsp ${LIBRARIES})
set_target_properties(glsp PROPERTIES LINKER_LANGUAGE CXX)
target_include_directories(glsp PUBLIC ${INCLUDES})
target_include_directories(glsp PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
set_property(TARGET glsp PROPERTY CXX_STANDARD 17)
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/glsp DESTINATION include FILES_MATCHING PATTERN *.hpp)
install (TARGETS glsp ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin)
install (TARGETS glsp EXPORT glspTargets
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include)
install(EXPORT glspTargets
FILE glspTargets.cmake
NAMESPACE jbraun::
DESTINATION lib/cmake/glsp
)
option(GLSP_BUILD_EXECUTABLE OFF "Builds the example executable(s).")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment