CMakeLists.txt 839 B

12345678910111213141516171819202122232425262728293031323334
  1. set(JSC_SOURCES
  2. ../jsc.cpp
  3. )
  4. set(JSC_LIBRARIES
  5. WTF
  6. JavaScriptCore
  7. ${CMAKE_DL_LIBS}
  8. )
  9. if ("${JavaScriptCore_LIBRARY_TYPE}" MATCHES "STATIC")
  10. add_definitions(-DSTATICALLY_LINKED_WITH_JavaScriptCore)
  11. endif ()
  12. WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
  13. WEBKIT_WRAP_SOURCELIST(${JSC_SOURCES})
  14. include_directories(./ ${JavaScriptCore_INCLUDE_DIRECTORIES})
  15. add_executable(jsc ${JSC_SOURCES})
  16. target_link_libraries(jsc ${JSC_LIBRARIES})
  17. set_target_properties(jsc PROPERTIES FOLDER "JavaScriptCore")
  18. if (JSC_OUTPUT_NAME)
  19. set_target_properties(jsc PROPERTIES OUTPUT_NAME ${JSC_OUTPUT_NAME})
  20. endif ()
  21. if (JSC_LINK_FLAGS)
  22. ADD_TARGET_PROPERTIES(jsc LINK_FLAGS "${JSC_LINK_FLAGS}")
  23. endif ()
  24. if (SHOULD_INSTALL_JS_SHELL)
  25. install(TARGETS jsc DESTINATION "${EXEC_INSTALL_DIR}")
  26. endif ()