CMakeLists.txt 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
  2. # reserved. Use of this source code is governed by a BSD-style license that
  3. # can be found in the LICENSE file.
  4. #
  5. # Source files.
  6. #
  7. # ml_fanzone sources.
  8. set(CEFSIMPLE_SRCS
  9. cef_app.cc
  10. cef_app.h
  11. cef_handler.cc
  12. cef_handler.h
  13. )
  14. set(CEFSIMPLE_SRCS_WINDOWS
  15. ml_fanzone.rc
  16. main.cpp
  17. resource.h
  18. cef_handler_win.cc
  19. )
  20. APPEND_PLATFORM_SOURCES(CEFSIMPLE_SRCS)
  21. source_group(ml_fanzone FILES ${CEFSIMPLE_SRCS})
  22. set(CEFSIMPLE_SRCS
  23. ${CEFSIMPLE_SRCS}
  24. )
  25. # ml_fanzone helper sources.
  26. APPEND_PLATFORM_SOURCES(CEFSIMPLE_HELPER_SRCS)
  27. source_group(ml_fanzone FILES ${CEFSIMPLE_HELPER_SRCS})
  28. # ml_fanzone resources.
  29. #
  30. # Shared configuration.
  31. #
  32. # Target executable names.
  33. set(CEF_TARGET "ml_fanzone")
  34. if(OS_MAC)
  35. set(CEF_HELPER_TARGET "ml_fanzone_Helper")
  36. set(CEF_HELPER_OUTPUT_NAME "ml_fanzone Helper")
  37. else()
  38. # Logical target used to link the libcef library.
  39. ADD_LOGICAL_TARGET("libcef_lib" "${CEF_LIB_DEBUG}" "${CEF_LIB_RELEASE}")
  40. endif()
  41. # Determine the target output directory.
  42. SET_CEF_TARGET_OUT_DIR()
  43. #
  44. # Windows configuration.
  45. #
  46. if(OS_WINDOWS)
  47. # Executable target.
  48. add_executable(${CEF_TARGET} WIN32 ${CEFSIMPLE_SRCS})
  49. add_dependencies(${CEF_TARGET} libcef_dll_wrapper)
  50. SET_EXECUTABLE_TARGET_PROPERTIES(${CEF_TARGET})
  51. target_link_libraries(${CEF_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS})
  52. if(USE_SANDBOX)
  53. # Logical target used to link the cef_sandbox library.
  54. ADD_LOGICAL_TARGET("cef_sandbox_lib" "${CEF_SANDBOX_LIB_DEBUG}" "${CEF_SANDBOX_LIB_RELEASE}")
  55. target_link_libraries(${CEF_TARGET} cef_sandbox_lib ${CEF_SANDBOX_STANDARD_LIBS})
  56. endif()
  57. # Add the custom manifest files to the executable.
  58. ADD_WINDOWS_MANIFEST("${CMAKE_CURRENT_SOURCE_DIR}" "${CEF_TARGET}" "dll")
  59. # Copy binary and resource files to the target output directory.
  60. COPY_FILES("${CEF_TARGET}" "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "${CEF_TARGET_OUT_DIR}")
  61. COPY_FILES("${CEF_TARGET}" "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "${CEF_TARGET_OUT_DIR}")
  62. endif()