CMakeLists.txt 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Source files and their filters
  2. include(CMakeSources.cmake)
  3. # Includes
  4. set(BansheeCore_INC
  5. "Include"
  6. "../BansheeUtility/Include"
  7. "../../Dependencies/Include")
  8. if(WIN32)
  9. set(BansheeCore_INC ${BansheeCore_INC} "Include/Win32")
  10. endif()
  11. include_directories(${BansheeCore_INC})
  12. # Target
  13. add_library(BansheeCore SHARED ${BS_BANSHEECORE_SRC})
  14. # Defines
  15. target_compile_definitions(BansheeCore PRIVATE -DBS_CORE_EXPORTS)
  16. # Libraries
  17. ## External lib: NVTT
  18. add_library(nvtt STATIC IMPORTED)
  19. set_target_properties(nvtt PROPERTIES IMPORTED_LOCATION_DEBUG ${BS_LIBRARY_DEPENDENCIES_DIR_DEBUG}/nvtt${BS_LIBRARY_EXTENSION})
  20. set_target_properties(nvtt PROPERTIES IMPORTED_LOCATION_OPTIMIZEDDEBUG ${BS_LIBRARY_DEPENDENCIES_DIR_OPTIMIZEDDEBUG}/nvtt${BS_LIBRARY_EXTENSION})
  21. set_target_properties(nvtt PROPERTIES IMPORTED_LOCATION_RELEASE ${BS_LIBRARY_DEPENDENCIES_DIR_RELEASE}/nvtt${BS_LIBRARY_EXTENSION})
  22. target_link_libraries(BansheeCore nvtt)
  23. ## Local libs
  24. target_link_libraries(BansheeCore BansheeUtility)
  25. ## OS libs
  26. if(WIN32)
  27. target_link_libraries(BansheeCore Winmm)
  28. else()
  29. # TODO_OTHER_PLATFORMS_GO_HERE
  30. endif()
  31. # IDE specific
  32. set_property(TARGET BansheeCore PROPERTY FOLDER Layers)