diff --git a/CMakeLists.txt b/CMakeLists.txt index cbc7883a..a46c0557 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,6 @@ include_directories(extlib/benz/include) include(piclib/CMakeLists.txt) include(contrib/CMakeLists.txt) include(src/CMakeLists.txt) -include(tools/CMakeLists.txt) # ---- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f4a62f1d..0ca3b949 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,3 +1,5 @@ +### libpicrin ### + find_package(Perl REQUIRED) # benz @@ -31,3 +33,15 @@ target_link_libraries(picrin m ${PICRIN_CONTRIB_LIBRARIES}) set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib) install(TARGETS picrin DESTINATION lib) install(DIRECTORY extlib/benz/include/ DESTINATION include FILES_MATCHING PATTERN "*.h") + +### picrin ### + +list(APPEND REPL_LIBRARIES picrin) + +# build +add_executable(repl src/main.c) +set_target_properties(repl PROPERTIES OUTPUT_NAME picrin) +target_link_libraries(repl ${REPL_LIBRARIES}) + +# install +install(TARGETS repl RUNTIME DESTINATION bin) diff --git a/tools/main.c b/src/main.c similarity index 100% rename from tools/main.c rename to src/main.c diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt deleted file mode 100644 index 24794f53..00000000 --- a/tools/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -list(APPEND REPL_LIBRARIES picrin) - -# 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)