Commit cbfb6438 authored by Sophie Wenzel-Teuber's avatar Sophie Wenzel-Teuber
Browse files

Divide the src directory for cmake into a library and an executable.

parent 5966b57c
include_directories(${PHOBOS_INCLUDE_DIRECTORY})
include_directories(/usr/include/glib-2.0)
include_directories(/usr/lib64/glib-2.0/include)
if(DEBUG)
add_compile_definitions(DEBUG)
endif(DEBUG)
add_executable(
fiphoboserver
server/server.cc
server/static_handler.cc
server/push_request_handler.cc
fiphobo/fiphobo_blocking.cc
)
add_subdirectory(fiphobo)
add_subdirectory(server)
if(CUSTOM_OUTPUT_DIRECTORY)
set_target_properties( fiphoboserver
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CUSTOM_OUTPUT_DIRECTORY}/fiphoboserver"
LIBRARY_OUTPUT_DIRECTORY "${CUSTOM_OUTPUT_DIRECTORY}/fiphoboserver"
RUNTIME_OUTPUT_DIRECTORY "${CUSTOM_OUTPUT_DIRECTORY}/fiphoboserver"
)
endif(CUSTOM_OUTPUT_DIRECTORY)
add_subdirectory(fiphobo/phobos_cpp_wrapper)
target_compile_features(fiphoboserver PUBLIC cxx_std_14)
target_link_libraries(fiphoboserver PUBLIC proxygen::proxygen)
target_link_libraries(fiphoboserver PUBLIC proxygen::proxygenhttpserver)
target_link_libraries(fiphoboserver PUBLIC phobos_store)
target_link_libraries(fiphoboserver PUBLIC phobos_cpp_wrapper)
include_directories(${PHOBOS_INCLUDE_DIRECTORY})
include_directories(/usr/include/glib-2.0)
include_directories(/usr/lib64/glib-2.0/include)
add_subdirectory(phobos_cpp_wrapper)
add_library(
fiphobo
fiphobo.cc
)
if(CUSTOM_OUTPUT_DIRECTORY)
set_target_properties( fiphobo
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CUSTOM_OUTPUT_DIRECTORY}/fiphoboserver"
LIBRARY_OUTPUT_DIRECTORY "${CUSTOM_OUTPUT_DIRECTORY}/fiphoboserver"
RUNTIME_OUTPUT_DIRECTORY "${CUSTOM_OUTPUT_DIRECTORY}/fiphoboserver"
)
endif(CUSTOM_OUTPUT_DIRECTORY)
target_compile_features(fiphobo PUBLIC cxx_std_14)
target_link_libraries(fiphobo PUBLIC phobos_store)
target_link_libraries(fiphobo PUBLIC phobos_cpp_wrapper)
target_link_libraries(fiphobo PUBLIC proxygen::proxygen)
\ No newline at end of file
include_directories(${PHOBOS_INCLUDE_DIRECTORY})
include_directories(/usr/include/glib-2.0)
include_directories(/usr/lib64/glib-2.0/include)
add_executable(
fiphoboserver
server.cc
static_handler.cc
push_request_handler.cc
)
if(CUSTOM_OUTPUT_DIRECTORY)
set_target_properties( fiphoboserver
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CUSTOM_OUTPUT_DIRECTORY}/fiphoboserver"
LIBRARY_OUTPUT_DIRECTORY "${CUSTOM_OUTPUT_DIRECTORY}/fiphoboserver"
RUNTIME_OUTPUT_DIRECTORY "${CUSTOM_OUTPUT_DIRECTORY}/fiphoboserver"
)
endif(CUSTOM_OUTPUT_DIRECTORY)
target_compile_features(fiphoboserver PUBLIC cxx_std_14)
target_link_libraries(fiphoboserver PUBLIC proxygen::proxygen)
target_link_libraries(fiphoboserver PUBLIC proxygen::proxygenhttpserver)
target_link_libraries(fiphoboserver PUBLIC fiphobo)
\ No newline at end of file
......@@ -12,7 +12,7 @@
#include <proxygen/httpserver/RequestHandler.h>
#include "../S3_header.h"
#include "../fiphobo/fiphobo_blocking.h"
#include "../fiphobo/fiphobo.h"
namespace proxygen {
class ResponseHandler;
......
......@@ -17,7 +17,7 @@
#include <proxygen/httpserver/RequestHandler.h>
#include <proxygen/httpserver/ResponseBuilder.h>
#include "../fiphobo/fiphobo_blocking.h"
#include "../fiphobo/fiphobo.h"
namespace fiphoboserver {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment