summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorjk7744.park <jk7744.park@samsung.com>2015-10-24 16:45:49 +0900
committerjk7744.park <jk7744.park@samsung.com>2015-10-24 16:45:49 +0900
commit6c7cebf382b34d1e32b260e6c93556f68a0bbaec (patch)
treea1113bcbe08e94f2d64881158ec03de6aac1cb34 /CMakeLists.txt
parent698b4074c441d1bdfc2dd7f1610a5402acb06654 (diff)
downloadmaps-plugin-mapquest-accepted/tizen_2.4_mobile.tar.gz
maps-plugin-mapquest-accepted/tizen_2.4_mobile.tar.bz2
maps-plugin-mapquest-accepted/tizen_2.4_mobile.zip
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt117
1 files changed, 117 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..9263e8e
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,117 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+SET(fw_name "maps-plugin-mapquest")
+PROJECT(${fw_name} C CXX)
+
+SET(CMAKE_INSTALL_PREFIX /usr)
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+
+# Dependencies
+SET(dependents "glib-2.0 gmodule-2.0 dlog libcurl capi-network-connection json-glib-1.0 capi-maps-service")
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED ${dependents})
+FOREACH(flag ${pkgs_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ SET(EXTRA_CXXFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+
+# Build
+SET(CMAKE_INSTALL_PREFIX /usr)
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fvisibility=hidden -fPIC -Wall -Werror")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpie ${EXTRA_CFLAGS} -Wall -g -fPIC -std=c++0x -fvisibility=hidden")
+
+IF("${ARCH}" STREQUAL "arm")
+ ADD_DEFINITIONS("-DTARGET")
+ENDIF("${ARCH}" STREQUAL "arm")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DEXPORT_API=__attribute__((visibility(\"default\")))")
+ADD_DEFINITIONS("-DTIZEN_DEBUG")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
+
+
+# Include files
+# Maps Service Includes
+SET(INC_DIR
+ include
+)
+
+# Maps Service Implementation
+SET(INTERNAL_INC_DIR
+ src
+)
+
+# Mapquest Engine Implementation
+SET(ENGINE_INC_DIR
+ src/mapquest
+)
+INCLUDE_DIRECTORIES(
+${INC_DIR} ${INTERNAL_INC_DIR} ${ENGINE_INC_DIR}
+)
+
+#This file must be corrected
+
+# Source Lists
+SET(SRCS
+ # Maps API
+ src/mapquest_plugin.c
+
+ # Mapquest Engine
+ src/mapquest/mapquest_api.c
+ src/mapquest/mapquest_geocode.c
+ src/mapquest/mapquest_revgeocode.c
+ src/mapquest/mapquest_route.c
+ src/mapquest/mapquest_place.c
+ src/mapquest/mapquest_restcurl.c
+ src/mapquest/mapquest_jsonparser.c
+ src/mapquest/mapquest_queue.c
+ src/mapquest/mapquest_util.c
+)
+
+ADD_LIBRARY(${fw_name} SHARED ${SRCS})
+
+SET_TARGET_PROPERTIES(${fw_name}
+ PROPERTIES
+ VERSION ${FULLVER}
+ SOVERSION ${MAJORVER}
+ CLEAN_DIRECT_OUTPUT 1
+)
+
+TARGET_LINK_LIBRARIES(${fw_name} ${pkgs_LDFLAGS})
+
+SET(PC_NAME ${fw_name})
+SET(PC_DESCRIPTION "Tizen mpaquest plugin Library")
+SET(PC_LDFLAGS -l${fw_name})
+SET(PC_INCLUDE /usr/include/maps)
+
+CONFIGURE_FILE(
+ ${fw_name}.pc.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
+ @ONLY
+)
+
+# Install
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION lib/pkgconfig)
+INSTALL(TARGETS ${fw_name} DESTINATION lib/maps/plugins)
+
+#INCLUDE(FindPkgConfig)
+#pkg_check_modules(lib_pkgs REQUIRED
+# capi-maps-service
+#)
+
+SET(LIB_APP_ASSIST capi-maps-service)
+INSTALL(
+ DIRECTORY ${INC_DIR}/ DESTINATION include/mapquest-plugin
+ FILES_MATCHING
+ PATTERN "*_internal.h" EXCLUDE
+ PATTERN "${INC_DIR}/mapquest_*.h"
+)
+
+# Test Suite
+#IF("${BINTYPE}" STREQUAL "eng")
+#ENDIF("${BINTYPE}" STREQUAL "eng")