CMakeLists.txt 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. set(MODULE_NAME "wmpplayer")
  2. set(MODULE_PREFIX "LIB_WMPPLYAER_FUNC")
  3. add_definitions(-D_AFXDLL)
  4. #Enables the use of the Microsoft Foundation Classes (MFC).
  5. #It should be set to 1 for the static MFC library, and 2 for the shared MFC library
  6. set(CMAKE_MFC_FLAG 2)
  7. #add_definitions(-DUNICODE -D_UNICODE)
  8. message(STATUS "MFC_DIR = ${MFC_FOUND}")
  9. message(STATUS "MFC_DIR = ${MFC_DIR}")
  10. message(STATUS "MFC_DIR = ${MFC_INCLUDE}")
  11. message(STATUS "MFC_DIR = ${MFC_INCLUDE_DIR}")
  12. message(STATUS "MFC_DIR = ${MFC_INCLUDE_LIBRARY}")
  13. message(STATUS "MFC_DIR = ${MFC_INCLUDE_LIBRARIES}")
  14. if(MSVC)
  15. set(STDAFXCPP ${RVC_FRAMEWORK_INCLUDE_DIR}/stdafx.cpp)
  16. else()
  17. set(STDAFXCPP )
  18. endif(MSVC)
  19. set(${MODULE_PREFIX}_SRCS
  20. stdafx.h
  21. ClibwmpplayerApp.cpp
  22. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPCdromCollection.cpp
  23. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPClosedCaption.cpp
  24. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPClosedCaption2.cpp
  25. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPControls.cpp
  26. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPControls2.cpp
  27. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPControls3.cpp
  28. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPDVD.cpp
  29. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPError.cpp
  30. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPErrorItem.cpp
  31. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPErrorItem2.cpp
  32. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPMedia.cpp
  33. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPMedia2.cpp
  34. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPMedia3.cpp
  35. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPMediaCollection.cpp
  36. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPMediaCollection2.cpp
  37. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPMetadataPicture.cpp
  38. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPMetadataText.cpp
  39. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPPlayer.cpp
  40. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPPlayer2.cpp
  41. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPPlayer3.cpp
  42. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPPlayer4.cpp
  43. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPPlaylist.cpp
  44. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPPlaylistCollection.cpp
  45. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPSettings.cpp
  46. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPSettings2.cpp
  47. ${ThirdPartyHeadRoot}/wmpplayer/src/CWMPStringCollection2.cpp
  48. libwmpplayer.cpp
  49. CPlayerDlg.cpp
  50. libwmpplayer.rc
  51. ${STDAFXCPP}
  52. )
  53. add_library(${MODULE_NAME} SHARED ${${MODULE_PREFIX}_SRCS})
  54. message(STATUS "VCInstallDir ${VCInstallDir}")
  55. target_include_directories(${MODULE_NAME} PRIVATE
  56. ${ThirdPartyHeadRoot}/wmpplayer/include
  57. ${CMAKE_CURRENT_SOURCE_DIR}
  58. )
  59. target_compile_definitions(${MODULE_NAME} PUBLIC "LIBWMPPLYAER_EXPORTS")
  60. if(MSVC)
  61. install(TARGETS ${MODULE_NAME}
  62. RUNTIME DESTINATION "${RVC_RUNTIME_PATH}" COMPONENT libraries
  63. ARCHIVE DESTINATION "${RVC_LIBRARY_PATH}" COMPONENT develops EXCLUDE_FROM_ALL
  64. LIBRARY DESTINATION "${RVC_LIBRARY_PATH}" COMPONENT libraries
  65. )
  66. else()
  67. install(TARGETS ${MODULE_NAME}
  68. RUNTIME DESTINATION "${RVC_RUNTIME_PATH}"
  69. ARCHIVE DESTINATION "${RVC_LIBRARY_PATH}"
  70. LIBRARY DESTINATION "${RVC_RUNTIME_PATH}"
  71. COMPONENT libraries)
  72. endif(MSVC)
  73. set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "other/")