diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b7adf6ed..50a3dd2e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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") diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index fc6c843c..0c5d93d7 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -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)