place netsim in static library
This commit is contained in:
parent
aa458dadd6
commit
8f840ff1fe
|
@ -2,4 +2,5 @@ cmake_minimum_required(VERSION 3.10)
|
||||||
|
|
||||||
project(network_simulator)
|
project(network_simulator)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(netsim)
|
||||||
|
add_subdirectory(gui)
|
7
gui/CMakeLists.txt
Normal file
7
gui/CMakeLists.txt
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
add_executable(netsim
|
||||||
|
"src/main.cpp"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(netsim PRIVATE
|
||||||
|
libnetsim
|
||||||
|
)
|
8
netsim/CMakeLists.txt
Normal file
8
netsim/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
add_library(libnetsim STATIC
|
||||||
|
"src/Device.cpp"
|
||||||
|
"src/Network.cpp"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(libnetsim PUBLIC
|
||||||
|
include
|
||||||
|
)
|
|
@ -1,9 +0,0 @@
|
||||||
add_executable(netsim
|
|
||||||
"main.cpp"
|
|
||||||
"Device.cpp"
|
|
||||||
"Network.cpp"
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(netsim PRIVATE
|
|
||||||
${CMAKE_SOURCE_DIR}/include
|
|
||||||
)
|
|
Loading…
Reference in a new issue