CMakeLists.txt 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. INCLUDE(PolycodeIncludes)
  2. INCLUDE_DIRECTORIES(
  3. ${LUA_INCLUDE_DIR}
  4. ${Polycode_SOURCE_DIR}/Bindings/Contents/LUA/Include
  5. )
  6. SET(CMAKE_DEBUG_POSTFIX "_d")
  7. IF(MSVC)
  8. SET(polycodeplayer_SRCS
  9. ../Build/MSVC/PolycodePlayer/player_icon.ico
  10. ../Build/MSVC/PolycodePlayer/main.cpp
  11. ../Build/MSVC/PolycodePlayer/PolycodePlayerView.cpp
  12. Source/PolycodePlayer.cpp
  13. Source/PolycodeWindowsPlayer.cpp
  14. )
  15. SET(polycodeplayer_HDRS
  16. ../Build/MSVC/PolycodePlayer/resource.h
  17. ../Build/MSVC/PolycodePlayer/PolycodePlayerView.h
  18. Include/PolycodePlayer.h
  19. Include/PolycodeWindowsPlayer.h
  20. )
  21. INCLUDE_DIRECTORIES(../Build/MSVC/PolycodePlayer Include)
  22. # IF(POLYCODE_BUILD_SHARED)
  23. # ADD_EXECUTABLE(PolycodePlayer_dynamic WIN32 ${polycodeplayer_SRCS} ${polycodeplayer_HDRS})
  24. # TARGET_LINK_LIBRARIES(PolycodePlayer Polycore_dynamic PolycodeLua ${LUA_LIBRARY})
  25. # ENDIF(POLYCODE_BUILD_SHARED)
  26. # IF(POLYCODE_BUILD_STATIC)
  27. ADD_EXECUTABLE(PolycodePlayer WIN32 ${polycodeplayer_SRCS} ${polycodeplayer_HDRS})
  28. TARGET_LINK_LIBRARIES(PolycodePlayer
  29. Polycore
  30. PolycodeLua
  31. ${LUA_LIBRARY}
  32. ${OPENGL_LIBRARIES}
  33. ${OPENAL_LIBRARY}
  34. ${PNG_LIBRARIES}
  35. ${FREETYPE_LIBRARIES}
  36. ${PHYSFS_LIBRARY}
  37. ${OGG_LIBRARY}
  38. ${VORBIS_LIBRARY}
  39. ${VORBISFILE_LIBRARY}
  40. )
  41. # ENDIF(POLYCODE_BUILD_STATIC)
  42. ELSEIF(APPLE)
  43. SET(polycodeplayer_SRCS
  44. # Source/PolycodePlayer.cpp
  45. Source/PolycodePlayer.mm
  46. Source/PolycodeCocoaPlayer.mm
  47. "../Build/Mac OS X/main.m"
  48. "../Build/Mac OS X/MyDocument.m"
  49. "../Build/Mac OS X/PPlayerDocumentController.m"
  50. )
  51. SET(polycodeplayer_HDRS
  52. Include/PolycodePlayer.h
  53. Include/PolycodeCocoaPlayer.h
  54. "../Build/Mac OS X/MyDocument.h"
  55. "../Build/Mac OS X/PPlayerDocumentController.h"
  56. )
  57. INCLUDE_DIRECTORIES(Include)
  58. # IF(POLYCODE_BUILD_SHARED)
  59. # ADD_EXECUTABLE(PolycodePlayer MACOSX_BUNDLE ${polycodeplayer_SRCS} ${polycodeplayer_HDRS})
  60. # TARGET_LINK_LIBRARIES(PolycodePlayer Polycore PolycodeLua ${LUA_LIBRARY})
  61. # ENDIF(POLYCODE_BUILD_SHARED)
  62. # IF(POLYCODE_BUILD_STATIC)
  63. ADD_EXECUTABLE(PolycodePlayer MACOSX_BUNDLE ${polycodeplayer_SRCS} ${polycodeplayer_HDRS})
  64. TARGET_LINK_LIBRARIES(PolycodePlayer
  65. Polycore
  66. PolycodeLua
  67. "-framework Cocoa"
  68. ${LUA_LIBRARY}
  69. ${OPENGL_LIBRARIES}
  70. ${OPENAL_LIBRARY}
  71. ${PNG_LIBRARIES}
  72. ${FREETYPE_LIBRARIES}
  73. ${PHYSFS_LIBRARY}
  74. ${OGG_LIBRARY}
  75. ${VORBIS_LIBRARY}
  76. ${VORBISFILE_LIBRARY}
  77. )
  78. # ENDIF(POLYCODE_BUILD_STATIC)
  79. ENDIF(MSVC)
  80. IF(POLYCODE_INSTALL_PLAYER)
  81. # IF(POLYCODE_BUILD_SHARED)
  82. # # install player
  83. # INSTALL(TARGETS PolycodePlayer_dynamic
  84. # DESTINATION ${POLYCODE_RELEASE_DIR}/Player)
  85. # ENDIF()
  86. # IF(POLYCODE_BUILD_STATIC)
  87. INSTALL(TARGETS PolycodePlayer
  88. DESTINATION Player)
  89. # ENDIF()
  90. ENDIF(POLYCODE_INSTALL_PLAYER)