From 8764bec50b51d1b905284a279e13c60ef6fabe5d Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Mon, 1 Sep 2014 09:40:55 +0900 Subject: [PATCH] move main.c to src/ --- CMakeLists.txt | 1 - src/CMakeLists.txt | 14 ++++++++++++++ {tools => src}/main.c | 0 tools/CMakeLists.txt | 9 --------- 4 files changed, 14 insertions(+), 10 deletions(-) rename {tools => src}/main.c (100%) delete mode 100644 tools/CMakeLists.txt 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)