CMakeLists.txt 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Source files and their filters
  2. include(CMakeSources.cmake)
  3. # Target
  4. if(WIN32)
  5. add_executable(Banshee3D WIN32 ${BS_BANSHEE3D_SRC})
  6. else()
  7. add_executable(Banshee3D ${BS_BANSHEE3D_SRC})
  8. endif()
  9. # Common flags
  10. add_common_flags(Banshee3D)
  11. # Includes
  12. target_include_directories(Banshee3D PRIVATE "./")
  13. # Libraries
  14. ## Local libs
  15. target_link_libraries(Banshee3D EditorScript bsfScript bsfMono EditorCore bsf)
  16. # IDE specific
  17. set_property(TARGET Banshee3D PROPERTY FOLDER Executable)
  18. # Plugin dependencies
  19. add_engine_dependencies(Banshee3D)
  20. add_dependencies(Banshee3D bsfFBXImporter bsfFontImporter bsfFreeImgImporter MonoExec)
  21. # Compiler flags
  22. if(MSVC)
  23. target_compile_options(Banshee3D PUBLIC /wd4509)
  24. endif()
  25. # Make sure `bsf` dlls are copied to our folders
  26. install_dll_on_build(Banshee3D ${BSF_DIRECTORY})
  27. # Make sure 'mono' dlls and other files are copied to our folders
  28. install_dll_on_build(Banshee3D ${BSF_SOURCE_DIR}/../Dependencies/mono)
  29. install_dylib_on_build(Banshee3D ${BSF_SOURCE_DIR}/../Dependencies/mono)
  30. copy_folder_on_build(Banshee3D ${BSF_SOURCE_DIR}/../Dependencies/mono ${PROJECT_BINARY_DIR} bin/Mono "*.*")
  31. # Install
  32. install_bsf_target(Banshee3D)