add support for `make install`
This commit is contained in:
parent
d143da430a
commit
bc7291a176
|
@ -18,3 +18,7 @@ add_custom_command(
|
|||
file(GLOB PICRIN_SOURCES ${PROJECT_SOURCE_DIR}/src/*.c)
|
||||
add_library(picrin SHARED ${PICRIN_SOURCES} ${PICLIB_SOURCES} ${FLEX_scan_OUTPUTS} ${XFILE_SOURCES} ${PICRIN_CONTRIB_SOURCES})
|
||||
target_link_libraries(picrin m ${PICRIN_CONTRIB_LIBRARIES})
|
||||
|
||||
# install
|
||||
install(TARGETS picrin LIBRARY DESTINATION lib)
|
||||
install(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN "*.h")
|
||||
|
|
|
@ -7,6 +7,10 @@ if (READLINE_FOUND)
|
|||
list(APPEND REPL_LIBRARIES ${READLINE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
# build
|
||||
add_executable(repl tools/main.c)
|
||||
set_target_properties(repl PROPERTIES OUTPUT_NAME picrin)
|
||||
target_link_libraries(repl ${REPL_LIBRARIES})
|
||||
|
||||
# install
|
||||
install(TARGETS repl RUNTIME DESTINATION bin)
|
||||
|
|
Loading…
Reference in New Issue