1enable_language(CSharp)
2set(CMAKE_CONFIGURATION_TYPES Debug)
3
4set(SRC_FILES
5  ${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/foo.cs
6  ${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/nested/baz.cs
7)
8
9set(IMAGE_FILES
10  ${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/Images/empty.bmp
11)
12# We explicitly don't set a source group for a source in the root level
13# because of https://gitlab.kitware.com/cmake/cmake/-/issues/21221
14set(RESOURCE_FILES
15  ${CMAKE_CURRENT_SOURCE_DIR}/VsCsharpSourceGroup.png
16)
17
18
19add_library(VsCsharpSourceGroup SHARED ${SRC_FILES} ${IMAGE_FILES} ${RESOURCE_FILES})
20source_group("CSharpSourceGroup" FILES ${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/foo.cs)
21source_group("CSharpSourceGroup/nested" FILES ${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/nested/baz.cs)
22source_group("Images" FILES ${IMAGE_FILES})
23
24# Test covering CMake Issue 22104.
25# Basically there should not be any link tags for files in the binary directory.
26include(CSharpUtilities)
27configure_file("${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/cmake/AssemblyInfo.cs.in" "Properties/AssemblyInfo.cs")
28
29target_sources(VsCsharpSourceGroup PRIVATE "Properties/AssemblyInfo.cs")
30csharp_set_designer_cs_properties("Properties/AssemblyInfo.cs")
31