CMakeLists.txt 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 1)
  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_COMMON_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. target_compile_options(${MODULE_NAME} PRIVATE "$<$<CXX_COMPILER_ID:MSVC>:/MT>")
  55. target_compile_options(${MODULE_NAME} PRIVATE "$<$<C_COMPILER_ID:MSVC>:/MT>")
  56. message(STATUS "VCInstallDir ${VCInstallDir}")
  57. target_include_directories(${MODULE_NAME} PRIVATE
  58. ${ThirdPartyHeadRoot}/wmpplayer/include
  59. ${CMAKE_CURRENT_SOURCE_DIR}
  60. )
  61. target_compile_definitions(${MODULE_NAME} PUBLIC "LIBWMPPLYAER_EXPORTS")
  62. if(MSVC)
  63. install(TARGETS ${MODULE_NAME}
  64. RUNTIME DESTINATION "${RVC_RUNTIME_PATH}" COMPONENT libraries
  65. ARCHIVE DESTINATION "${RVC_LIBRARY_PATH}" COMPONENT develops EXCLUDE_FROM_ALL
  66. LIBRARY DESTINATION "${RVC_LIBRARY_PATH}" COMPONENT libraries
  67. )
  68. else()
  69. install(TARGETS ${MODULE_NAME}
  70. RUNTIME DESTINATION "${RVC_RUNTIME_PATH}"
  71. ARCHIVE DESTINATION "${RVC_LIBRARY_PATH}"
  72. LIBRARY DESTINATION "${RVC_RUNTIME_PATH}"
  73. COMPONENT libraries)
  74. endif(MSVC)
  75. set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "other/")