diff --git a/doorlockd/CMakeLists.txt b/doorlockd/CMakeLists.txt index 9a8cb45..ef5459c 100644 --- a/doorlockd/CMakeLists.txt +++ b/doorlockd/CMakeLists.txt @@ -51,29 +51,36 @@ include_directories(${JSON_INCLUDE_DIR}) find_package (Threads) -set(SRCS -clientmessage.cpp -clientmessage.h -daemon.cpp -daemon.h -door.cpp -door.h -doormessage.h -logger.cpp -logger.h -logic.cpp -logic.h -response.cpp -response.h -util.cpp -util.h +set(DOORLOCKD_SRCS + src/clientmessage.cpp + src/clientmessage.h + src/daemon.cpp + src/daemon.h + src/door.cpp + src/door.h + src/doormessage.h + src/logger.cpp + src/logger.h + src/logic.cpp + src/logic.h + src/response.cpp + src/response.h + src/util.cpp + src/util.h -doorlockd.cpp + src/doorlockd.cpp ) -add_executable(doorlockd ${SRCS}) +set(DOORLOCK_CLIENT_SRCS + src/doorlock-client.cpp +) + +add_executable(doorlockd ${DOORLOCKD_SRCS}) target_link_libraries(doorlockd jsoncpp ldap ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) +add_executable(doorlock-client ${DOORLOCK_CLIENT_SRCS}) +target_link_libraries(doorlock-client jsoncpp) + install(TARGETS doorlockd DESTINATION sbin/) install(FILES img/template.png DESTINATION share/doorlockd/) install(DIRECTORY scripts/ DESTINATION share/doorlockd/ diff --git a/doorlockd/clientmessage.cpp b/doorlockd/src/clientmessage.cpp similarity index 100% rename from doorlockd/clientmessage.cpp rename to doorlockd/src/clientmessage.cpp diff --git a/doorlockd/clientmessage.h b/doorlockd/src/clientmessage.h similarity index 100% rename from doorlockd/clientmessage.h rename to doorlockd/src/clientmessage.h diff --git a/doorlockd/daemon.cpp b/doorlockd/src/daemon.cpp similarity index 100% rename from doorlockd/daemon.cpp rename to doorlockd/src/daemon.cpp diff --git a/doorlockd/daemon.h b/doorlockd/src/daemon.h similarity index 100% rename from doorlockd/daemon.h rename to doorlockd/src/daemon.h diff --git a/doorlockd/door.cpp b/doorlockd/src/door.cpp similarity index 100% rename from doorlockd/door.cpp rename to doorlockd/src/door.cpp diff --git a/doorlockd/door.h b/doorlockd/src/door.h similarity index 100% rename from doorlockd/door.h rename to doorlockd/src/door.h diff --git a/doorlockd/src/doorlock-client.cpp b/doorlockd/src/doorlock-client.cpp new file mode 100644 index 0000000..58fe692 --- /dev/null +++ b/doorlockd/src/doorlock-client.cpp @@ -0,0 +1,4 @@ +int main(void) +{ + return 0; +} diff --git a/doorlockd/doorlockd.cpp b/doorlockd/src/doorlockd.cpp similarity index 100% rename from doorlockd/doorlockd.cpp rename to doorlockd/src/doorlockd.cpp diff --git a/doorlockd/doormessage.h b/doorlockd/src/doormessage.h similarity index 100% rename from doorlockd/doormessage.h rename to doorlockd/src/doormessage.h diff --git a/doorlockd/logger.cpp b/doorlockd/src/logger.cpp similarity index 100% rename from doorlockd/logger.cpp rename to doorlockd/src/logger.cpp diff --git a/doorlockd/logger.h b/doorlockd/src/logger.h similarity index 100% rename from doorlockd/logger.h rename to doorlockd/src/logger.h diff --git a/doorlockd/logic.cpp b/doorlockd/src/logic.cpp similarity index 100% rename from doorlockd/logic.cpp rename to doorlockd/src/logic.cpp diff --git a/doorlockd/logic.h b/doorlockd/src/logic.h similarity index 100% rename from doorlockd/logic.h rename to doorlockd/src/logic.h diff --git a/doorlockd/response.cpp b/doorlockd/src/response.cpp similarity index 100% rename from doorlockd/response.cpp rename to doorlockd/src/response.cpp diff --git a/doorlockd/response.h b/doorlockd/src/response.h similarity index 100% rename from doorlockd/response.h rename to doorlockd/src/response.h diff --git a/doorlockd/util.cpp b/doorlockd/src/util.cpp similarity index 100% rename from doorlockd/util.cpp rename to doorlockd/src/util.cpp diff --git a/doorlockd/util.h b/doorlockd/src/util.h similarity index 100% rename from doorlockd/util.h rename to doorlockd/src/util.h