place netsim in static library

This commit is contained in:
Robert 2023-06-30 01:19:45 +02:00
parent aa458dadd6
commit 8f840ff1fe
10 changed files with 17 additions and 10 deletions

View file

@ -2,4 +2,5 @@ cmake_minimum_required(VERSION 3.10)
project(network_simulator)
add_subdirectory(src)
add_subdirectory(netsim)
add_subdirectory(gui)

7
gui/CMakeLists.txt Normal file
View file

@ -0,0 +1,7 @@
add_executable(netsim
"src/main.cpp"
)
target_link_libraries(netsim PRIVATE
libnetsim
)

8
netsim/CMakeLists.txt Normal file
View file

@ -0,0 +1,8 @@
add_library(libnetsim STATIC
"src/Device.cpp"
"src/Network.cpp"
)
target_include_directories(libnetsim PUBLIC
include
)

View file

@ -1,9 +0,0 @@
add_executable(netsim
"main.cpp"
"Device.cpp"
"Network.cpp"
)
target_include_directories(netsim PRIVATE
${CMAKE_SOURCE_DIR}/include
)