summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKim Kibum <kb0929.kim@samsung.com>2012-06-08 14:53:52 +0900
committerKim Kibum <kb0929.kim@samsung.com>2012-06-08 14:53:52 +0900
commitca861ba7b3f14b22fe5b53131c93399a87e68e90 (patch)
tree50eb42707c28bda3c8fc0ec3231e27839f17e45b /CMakeLists.txt
parentee54cf2cefee179673d821d800ea5ec599ad0975 (diff)
downloadorg.tizen.browser-ca861ba7b3f14b22fe5b53131c93399a87e68e90.tar.gz
org.tizen.browser-ca861ba7b3f14b22fe5b53131c93399a87e68e90.tar.bz2
org.tizen.browser-ca861ba7b3f14b22fe5b53131c93399a87e68e90.zip
apply FSL(Flora Software License)
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt297
1 files changed, 297 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100755
index 0000000..d1418c5
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,297 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(browser CXX)
+
+SET(SRCS
+ src/browser-class.cpp
+ src/browser-window.cpp
+ src/browser-main.cpp
+ src/browser-common-view.cpp
+ src/browser-data-manager.cpp
+ src/browser-utility.cpp
+ src/browser-extension/browser-find-word.cpp
+ src/browser-extension/browser-download-manager.cpp
+ src/browser-extension/browser-exscheme-handler.cpp
+ src/browser-extension/browser-picker-handler.cpp
+ src/browser-extension/browser-notification-manager.cpp
+ src/browser-security/browser-personal-data-manager.cpp
+ src/browser-security/browser-authentication-manager.cpp
+ src/browser-security/browser-certificate-manager.cpp
+ src/browser-view/browser-view.cpp
+ src/browser-view/browser-predictive-history.cpp
+ src/browser-view/browser-context-menu.cpp
+ src/browser-multi-window/browser-multi-window-view.cpp
+ src/data-network/browser-network-manager.cpp
+ src/browser-bookmark/browser-bookmark-view.cpp
+ src/browser-bookmark/browser-add-to-bookmark-view.cpp
+ src/browser-bookmark/browser-new-folder-view.cpp
+ src/browser-bookmark/browser-select-folder-view.cpp
+ src/browser-history/browser-history-layout.cpp
+ src/database/browser-bookmark-db.cpp
+ src/database/browser-user-agent-db.cpp
+ src/database/browser-history-db.cpp
+ src/database/browser-personal-data-db.cpp
+ src/database/browser-notification-db.cpp
+ src/browser-settings/browser-settings-class.cpp
+ src/browser-settings/browser-settings-main-view.cpp
+ src/browser-settings/browser-settings-edit-homepage-view.cpp
+ src/browser-settings/browser-settings-clear-data-view.cpp
+ src/browser-settings/browser-settings-plugin-view.cpp
+ src/browser-settings/browser-settings-user-agent-view.cpp
+ src/browser-settings/browser-settings-accelerated-composition.cpp
+)
+
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+ SET(CMAKE_BUILD_TYPE "Release")
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/database)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/data-network)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/browser-bookmark)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/browser-view)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/browser-multi-window)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/browser-history)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/browser-settings)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/browser-extension)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/browser-security)
+
+# set pkg-config modules
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+ eina ecore evas ecore-evas edbus elementary
+ appcore-efl dlog db-util utilX ui-gadget tapi sensor
+ secure-storage libsoup-2.4 libxml-2.0 libssl elm-webview notification
+ ecore-input ecore-imf edje cairo ecore-x ewebkit appsvc devman
+ capi-appfw-app-manager capi-appfw-application capi-web-url-download devman_haptic
+)
+
+FIND_LIBRARY(LIB_GNUTLS gnutls)
+FOREACH(flag ${pkgs_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+# set extra defines
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(BINDIR "${PREFIX}/bin")
+SET(RESDIR "${PREFIX}/res")
+SET(DATADIR "${PREFIX}/data")
+# res (read-only)
+SET(EDJE_DIR "${RESDIR}/edje/")
+SET(LOCALE_DIR "${RESDIR}/locale/")
+SET(IMAGES_DIR "${RESDIR}/images/")
+SET(HTML_DIR "${RESDIR}/html/")
+SET(ICON_DIR "${RESDIR}/icons/default/small/")
+# data
+SET(XML_DIR "${DATADIR}/xml/")
+SET(OPML_DIR "${DATADIR}/opml/")
+SET(DATABASE_DIR "${DATADIR}/db/")
+SET(SCREENSHOTS_DIR "${DATADIR}/screenshots/")
+SET(CERTIFICATES_TMP_FILE "${DATADIR}/certificates.crt")
+SET(WEBKIT_SOUP_CACHE_DIR "${DATADIR}/cache/")
+# other defines
+SET(CERTIFICATES_DIR "/opt/etc/ssl/certs/")
+SET(DATABASENAME ".browser.db")
+SET(HISTORY_DATABASENAME ".browser-history.db")
+SET(CREDENTIAL_DATABASENAME ".browser-credential.db")
+SET(SPEEDDIAL_DATABASENAME ".browser-speeddial.db")
+SET(COOKIES_DATABASENAME ".browser-cookies.db")
+SET(DESKTOP_DIR "/opt/share/applications")
+ADD_DEFINITIONS(
+ -DPROJECT_NAME=\"${PROJECT_NAME}\"
+ -DDATABASENAME=\"${DATABASENAME}\"
+ -DHISTORY_DATABASENAME=\"${HISTORY_DATABASENAME}\"
+ -DCREDENTIAL_DATABASENAME=\"${CREDENTIAL_DATABASENAME}\"
+ -DSPEEDDIAL_DATABASENAME=\"${SPEEDDIAL_DATABASENAME}\"
+ -DCOOKIES_DATABASENAME=\"${COOKIES_DATABASENAME}\"
+ -DEDJE_DIR=\"${EDJE_DIR}\"
+ -DLOCALEDIR=\"${LOCALE_DIR}\"
+ -DIMAGES_DIR=\"${IMAGES_DIR}\"
+ -DSCREENSHOTS_DIR=\"${SCREENSHOTS_DIR}\"
+ -DHTML_DIR=\"${HTML_DIR}\"
+ -DXML_DIR=\"${XML_DIR}\"
+ -DOPML_DIR=\"${OPML_DIR}\"
+ -DCERTIFICATES_DIR=\"${CERTIFICATES_DIR}\"
+ -DCERTIFICATES_TMP_FILE=\"${CERTIFICATES_TMP_FILE}\"
+ -DDATABASE_DIR=\"${DATABASE_DIR}\"
+ -DWEBKIT_SOUP_CACHE_DIR=\"${WEBKIT_SOUP_CACHE_DIR}\"
+ -DLOG_TAG=\"org.tizen.browser\"
+ -D__BUILD__
+)
+
+# set flags
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g")
+SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
+
+FIND_PROGRAM(UNAME NAMES uname)
+EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
+IF("${ARCH}" STREQUAL "arm")
+ ADD_DEFINITIONS("-D_TARGET")
+ MESSAGE("add -D_TARGET")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpie")
+ #SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mabi=aapcs-linux -march=armv7-a -msoft-float")
+ SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mabi=aapcs-linux -mfpu=vfp -mfloat-abi=softfp")
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
+ENDIF("${ARCH}" STREQUAL "arm")
+
+SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed -Wl,--hash-style=both")
+
+# real make??
+ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} ${LIB_GNUTLS})
+#TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} ewebkit)
+
+# browser-define.edj
+ADD_CUSTOM_TARGET(browser-define.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images
+ ${CMAKE_SOURCE_DIR}/edc/browser-define.edc
+ ${CMAKE_BINARY_DIR}/edc/browser-define.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/edc/browser-define.edc
+ )
+ADD_DEPENDENCIES(${PROJECT_NAME} browser-define.edj)
+
+# browser-view-progressbar.edj
+ADD_CUSTOM_TARGET(browser-view-progressbar.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images
+ ${CMAKE_SOURCE_DIR}/edc/browser-view-progressbar.edc
+ ${CMAKE_BINARY_DIR}/edc/browser-view-progressbar.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/edc/browser-view-progressbar.edc
+ )
+ADD_DEPENDENCIES(${PROJECT_NAME} browser-view-progressbar.edj)
+
+# browser-naviframe.edj
+ADD_CUSTOM_TARGET(browser-naviframe.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images
+ ${CMAKE_SOURCE_DIR}/edc/browser-naviframe.edc
+ ${CMAKE_BINARY_DIR}/edc/browser-naviframe.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/edc/browser-naviframe.edc
+ )
+ADD_DEPENDENCIES(${PROJECT_NAME} browser-naviframe.edj)
+
+# browser-view-main.edj
+ADD_CUSTOM_TARGET(browser-view-main.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images
+ ${CMAKE_SOURCE_DIR}/edc/browser-view-main.edc
+ ${CMAKE_BINARY_DIR}/edc/browser-view-main.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/edc/browser-view-main.edc
+ )
+ADD_DEPENDENCIES(${PROJECT_NAME} browser-view-main.edj)
+
+# browser-view-url-layout.edj
+ADD_CUSTOM_TARGET(browser-view-url-layout.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images
+ ${CMAKE_SOURCE_DIR}/edc/browser-view-url-layout.edc
+ ${CMAKE_BINARY_DIR}/edc/browser-view-url-layout.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/edc/browser-view-url-layout.edc
+ )
+ADD_DEPENDENCIES(${PROJECT_NAME} browser-view-url-layout.edj)
+
+# browser-view-find-word-layout.edj
+ADD_CUSTOM_TARGET(browser-view-find-word-layout.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images
+ ${CMAKE_SOURCE_DIR}/edc/browser-view-find-word-layout.edc
+ ${CMAKE_BINARY_DIR}/edc/browser-view-find-word-layout.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/edc/browser-view-find-word-layout.edc
+ )
+ADD_DEPENDENCIES(${PROJECT_NAME} browser-view-find-word-layout.edj)
+
+# browser-view-control-bar.edj
+ADD_CUSTOM_TARGET(browser-view-control-bar.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images
+ ${CMAKE_SOURCE_DIR}/edc/browser-view-control-bar.edc
+ ${CMAKE_BINARY_DIR}/edc/browser-view-control-bar.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/edc/browser-view-control-bar.edc
+ )
+ADD_DEPENDENCIES(${PROJECT_NAME} browser-view-control-bar.edj)
+
+# browser-bookmark-view.edj
+ADD_CUSTOM_TARGET(browser-bookmark-view.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images
+ ${CMAKE_SOURCE_DIR}/edc/browser-bookmark-view.edc
+ ${CMAKE_BINARY_DIR}/edc/browser-bookmark-view.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/edc/browser-bookmark-view.edc
+ )
+ADD_DEPENDENCIES(${PROJECT_NAME} browser-bookmark-view.edj)
+
+# browser-multi-window.edj
+ADD_CUSTOM_TARGET(browser-multi-window.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images
+ ${CMAKE_SOURCE_DIR}/edc/browser-multi-window.edc
+ ${CMAKE_BINARY_DIR}/edc/browser-multi-window.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/edc/browser-multi-window.edc
+ )
+ADD_DEPENDENCIES(${PROJECT_NAME} browser-multi-window.edj)
+
+# browser-predictive-history.edj
+ADD_CUSTOM_TARGET(browser-predictive-history.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images
+ ${CMAKE_SOURCE_DIR}/edc/browser-predictive-history.edc
+ ${CMAKE_BINARY_DIR}/edc/browser-predictive-history.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/edc/browser-predictive-history.edc
+ )
+ADD_DEPENDENCIES(${PROJECT_NAME} browser-predictive-history.edj)
+
+# browser-settings.edj
+ADD_CUSTOM_TARGET(browser-settings.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images
+ ${CMAKE_SOURCE_DIR}/edc/browser-settings.edc
+ ${CMAKE_BINARY_DIR}/edc/browser-settings.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/edc/browser-settings.edc
+ )
+ADD_DEPENDENCIES(${PROJECT_NAME} browser-settings.edj)
+
+# browser-picker-layout.edj
+ADD_CUSTOM_TARGET(browser-picker-layout.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images
+ ${CMAKE_SOURCE_DIR}/edc/browser-picker-layout.edc
+ ${CMAKE_BINARY_DIR}/edc/browser-picker-layout.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/edc/browser-picker-layout.edc
+ )
+ADD_DEPENDENCIES(${PROJECT_NAME} browser-picker-layout.edj)
+
+# install browser
+INSTALL(PROGRAMS ${PROJECT_NAME} DESTINATION bin)
+# install edj
+INSTALL(FILES ${CMAKE_BINARY_DIR}/edc/browser-define.edj DESTINATION ${EDJE_DIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/edc/browser-naviframe.edj DESTINATION ${EDJE_DIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/edc/browser-view-main.edj DESTINATION ${EDJE_DIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/edc/browser-view-progressbar.edj DESTINATION ${EDJE_DIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/edc/browser-view-url-layout.edj DESTINATION ${EDJE_DIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/edc/browser-view-find-word-layout.edj DESTINATION ${EDJE_DIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/edc/browser-view-control-bar.edj DESTINATION ${EDJE_DIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/edc/browser-bookmark-view.edj DESTINATION ${EDJE_DIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/edc/browser-multi-window.edj DESTINATION ${EDJE_DIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/edc/browser-predictive-history.edj DESTINATION ${EDJE_DIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/edc/browser-settings.edj DESTINATION ${EDJE_DIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/edc/browser-picker-layout.edj DESTINATION ${EDJE_DIR})
+
+# install images
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/images/install/ DESTINATION ${IMAGES_DIR}
+ FILES_MATCHING
+ PATTERN "*.png"
+)
+# install html files
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/html/ DESTINATION ${HTML_DIR}
+ FILES_MATCHING PATTERN "*.html"
+ PATTERN "*.png"
+)
+# install empty directories
+INSTALL(DIRECTORY DESTINATION ${DATABASE_DIR})
+INSTALL(DIRECTORY DESTINATION ${XML_DIR})
+INSTALL(DIRECTORY DESTINATION ${OPML_DIR})
+INSTALL(DIRECTORY DESTINATION ${SCREENSHOTS_DIR})
+INSTALL(DIRECTORY DESTINATION ${WEBKIT_SOUP_CACHE_DIR})
+
+# install desktop file & icon
+CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/resource/org.tizen.${PROJECT_NAME}.desktop.in org.tizen.${PROJECT_NAME}.desktop)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/org.tizen.${PROJECT_NAME}.desktop DESTINATION ${DESKTOP_DIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/org.tizen.${PROJECT_NAME}.png DESTINATION ${ICON_DIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/default_0 DESTINATION ${SCREENSHOTS_DIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/default_1 DESTINATION ${SCREENSHOTS_DIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/default_2 DESTINATION ${SCREENSHOTS_DIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/default_3 DESTINATION ${SCREENSHOTS_DIR})
+
+# i18n
+ADD_SUBDIRECTORY(po)