CMakeLists.txt 535 B

12345678910111213141516
  1. cmake_minimum_required(VERSION 3.3)
  2. # a simple CSharp only test case
  3. project (CSharpOnly CSharp)
  4. # C# does not make any difference between STATIC and SHARED libs
  5. add_library(lib1 STATIC lib1.cs nested/lib1.cs)
  6. #without the source group this test will fail to compile
  7. source_group(nested FILES nested/lib1.cs)
  8. add_library(lib2 SHARED lib2.cs)
  9. add_executable(CSharpOnly csharponly.cs)
  10. target_link_libraries(CSharpOnly lib1 lib2)
  11. add_custom_target(CSharpCustom ALL SOURCES empty.cs)
  12. add_custom_target(custom.cs ALL DEPENDS empty.txt)