cmake: Move example programs into folders (#1654)

This looks cleaner in VS.
This commit is contained in:
Thad House
2019-06-10 20:04:34 -07:00
committed by Peter Johnson
parent 221011494d
commit bb48ae391e
3 changed files with 8 additions and 0 deletions

View File

@@ -56,3 +56,5 @@ install(EXPORT cameraserver DESTINATION ${cameraserver_config_dir})
file(GLOB multiCameraServer_src multiCameraServer/src/main/native/cpp/*.cpp)
add_executable(multiCameraServer ${multiCameraServer_src})
target_link_libraries(multiCameraServer cameraserver)
set_property(TARGET multiCameraServer PROPERTY FOLDER "examples")

View File

@@ -52,6 +52,7 @@ foreach(example ${cscore_examples})
if(cscore_example_src)
add_executable(cscore_${example} ${cscore_example_src})
target_link_libraries(cscore_${example} cscore)
set_property(TARGET cscore_${example} PROPERTY FOLDER "examples")
endif()
endforeach()

View File

@@ -140,6 +140,7 @@ foreach(example ${wpiutil_examples})
if(wpiutil_example_src)
add_executable(wpiutil_${example} ${wpiutil_example_src})
target_link_libraries(wpiutil_${example} wpiutil)
set_property(TARGET wpiutil_${example} PROPERTY FOLDER "examples")
endif()
endforeach()
@@ -148,6 +149,7 @@ if (UNIX AND NOT APPLE)
else()
set (LIBUTIL)
endif()
file(GLOB netconsoleServer_src src/netconsoleServer/native/cpp/*.cpp)
add_executable(netconsoleServer ${netconsoleServer_src})
target_link_libraries(netconsoleServer wpiutil ${LIBUTIL})
@@ -155,3 +157,6 @@ target_link_libraries(netconsoleServer wpiutil ${LIBUTIL})
file(GLOB netconsoleTee_src src/netconsoleTee/native/cpp/*.cpp)
add_executable(netconsoleTee ${netconsoleTee_src})
target_link_libraries(netconsoleTee wpiutil)
set_property(TARGET netconsoleServer PROPERTY FOLDER "examples")
set_property(TARGET netconsoleTee PROPERTY FOLDER "examples")