Skip to content

Commit

Permalink
cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
dchansen06 committed Dec 20, 2024
1 parent b551d1b commit 3004b5c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
11 changes: 11 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
1 change: 0 additions & 1 deletion src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ You should have received a copy of the GNU General Public License along with thi
#include <string>

#include "client_functions.h"
#include "signals.h"

using namespace std;

Expand Down
1 change: 0 additions & 1 deletion src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ You should have received a copy of the GNU General Public License along with thi

#include <iostream>

#include "signals.h"
#include "server_functions.h"

using namespace std;
Expand Down

0 comments on commit 3004b5c

Please # to comment.