CMakeLists.txt 739 B

123456789101112131415161718192021222324
  1. # Generate the CS project file
  2. generate_csharp_project(${PROJECT_SOURCE_DIR}/Source/EditorManaged MBansheeEditor bs.Editor MBansheeEditor)
  3. # Include the CS project in the build
  4. set(BS_CS_PROJ "MBansheeEditor.csproj")
  5. if(MSVC)
  6. include_external_msproject(MBansheeEditor ${CMAKE_CURRENT_SOURCE_DIR}/${BS_CS_PROJ})
  7. add_dependencies(MBansheeEditor MBansheeEngine)
  8. set_property(TARGET MBansheeEditor PROPERTY FOLDER Script)
  9. else()
  10. find_package(mcs)
  11. if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
  12. set(CS_PROJ_CONFIG Debug)
  13. else()
  14. set(CS_PROJ_CONFIG Release)
  15. endif()
  16. add_custom_target(MBansheeEditor
  17. COMMAND xbuild /p:Configuration=${CS_PROJ_CONFIG} ${BS_CS_PROJ}
  18. COMMENT "Building managed assembly \"MBansheeEditor\"")
  19. endif()