diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..6f67230 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.10) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED true) + +project(MusicPlayer) +add_subdirectory(src) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..11d3839 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,11 @@ +add_executable(client client.cpp client_functions.cpp) +add_executable(server server.cpp server_functions.cpp) + +find_package(SDL2 REQUIRED) +find_package(SDL2_mixer REQUIRED) +target_link_libraries(server SDL2) +target_link_libraries(server SDL2_mixer) +include_directories(${SDL2_INCLUDE_DIRS} ${SDL2_MIXER_INCLUDE_DIRS}) + +INSTALL(TARGETS client DESTINATION ${MusicPlayer_SOURCE_DIR}/build) +INSTALL(TARGETS server DESTINATION ${MusicPlayer_SOURCE_DIR}/build) diff --git a/src/client.cpp b/src/client.cpp index 06176ae..0e90ed4 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -7,7 +7,6 @@ You should have received a copy of the GNU General Public License along with thi #include #include "client_functions.h" -#include "signals.h" using namespace std; diff --git a/src/server.cpp b/src/server.cpp index 46aecb7..0933e9c 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -6,7 +6,6 @@ You should have received a copy of the GNU General Public License along with thi #include -#include "signals.h" #include "server_functions.h" using namespace std;