CMakeLists.txt 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Source files and their filters
  2. include(CMakeSources.cmake)
  3. # Packages
  4. find_package(nvtt REQUIRED)
  5. # Includes
  6. set(BansheeCore_INC
  7. "./"
  8. "../BansheeUtility")
  9. if(WIN32)
  10. set(BansheeCore_INC ${BansheeCore_INC} "Win32")
  11. endif()
  12. include_directories(${BansheeCore_INC})
  13. # Target
  14. add_library(BansheeCore SHARED ${BS_BANSHEECORE_SRC})
  15. # Defines
  16. target_compile_definitions(BansheeCore PRIVATE -DBS_CORE_EXPORTS)
  17. # Libraries
  18. ## External lib: NVTT
  19. target_link_libraries(BansheeCore PRIVATE ${nvtt_LIBRARIES})
  20. ## Local libs
  21. target_link_libraries(BansheeCore PUBLIC BansheeUtility)
  22. ## OS libs
  23. if(WIN32)
  24. target_link_libraries(BansheeCore PRIVATE Winmm dinput8 xinput9_1_0 dxguid.lib)
  25. elseif(APPLE) # MacOS
  26. target_link_framework(BansheeCore CoreServices)
  27. target_link_framework(BansheeCore IOKit)
  28. target_link_framework(BansheeCore AppKit)
  29. target_link_framework(BansheeCore Carbon)
  30. endif()
  31. # IDE specific
  32. set_property(TARGET BansheeCore PROPERTY FOLDER Layers)
  33. # Install
  34. install(
  35. DIRECTORY .
  36. DESTINATION include
  37. FILES_MATCHING PATTERN "*.h"
  38. PATTERN "Private" EXCLUDE
  39. )
  40. install(
  41. TARGETS BansheeCore
  42. RUNTIME DESTINATION bin
  43. LIBRARY DESTINATION lib
  44. ARCHIVE DESTINATION lib
  45. )