CMakeLists.txt 940 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Source files and their filters
  2. include(CMakeSources.cmake)
  3. # Includes
  4. set(Game_INC
  5. "Include"
  6. "../BansheeUtility/Include"
  7. "../BansheeCore/Include"
  8. "../BansheeEngine/Include")
  9. include_directories(${Game_INC})
  10. # Target
  11. if(WIN32)
  12. add_executable(Game WIN32 ${BS_GAME_SRC})
  13. else()
  14. add_executable(Game ${BS_GAME_SRC})
  15. endif()
  16. # Post-build step
  17. if(WIN32)
  18. if(BS_64BIT)
  19. set(BS_COPY_FOLDER Win64)
  20. else()
  21. set(BS_COPY_FOLDER Win32)
  22. endif()
  23. add_custom_command(TARGET Game POST_BUILD
  24. COMMAND xcopy /Y /I \"$(TargetDir)$(TargetName).exe\" \"$(SolutionDir)..\\..\\Data\\Binaries\\${BS_COPY_FOLDER}\\\"
  25. )
  26. else()
  27. # TODO_OTHER_PLATFORMS_GO_HERE
  28. endif()
  29. # Libraries
  30. ## Local libs
  31. target_link_libraries(Game BansheeEngine BansheeUtility BansheeCore)
  32. # IDE specific
  33. set_property(TARGET Game PROPERTY FOLDER Executable)
  34. # Plugin dependencies
  35. add_engine_dependencies(Game)
  36. # Compiler flags
  37. target_compile_options(Game PUBLIC /wd4509)