CMAKE_MINIMUM_REQUIRED(VERSION 2.6) SET (this_target osp-locations) SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output) INCLUDE_DIRECTORIES ( ${ROOTSTRAP_ROOT}/usr/include/location ${ROOTSTRAP_ROOT}/usr/include inc src /usr/include/osp /usr/include/osp/app /usr/include/osp/base /usr/include/osp/system /usr/include/osp/security ) SET (${this_target}_SOURCE_FILES src/FLocCoordinates.cpp src/FLocLocationCriteria.cpp src/FLocLocation.cpp src/FLocLocationProvider.cpp src/FLoc_EllipsoidModel.cpp src/FLoc_LocationImpl.cpp src/FLoc_LocationManager.cpp src/FLoc_LocationProviderImpl.cpp src/FLoc_MathUtils.cpp src/FLoc_LocationMonitor.cpp ) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall" ) ## SET C COMPILER FLAGS SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}") ## SET CPP COMPILER FLAGS SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}") ## Create Library ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES}) ## SET LINKER FLAGS SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw") TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-uifw") TARGET_LINK_LIBRARIES(${this_target} "-lcapi-location-manager") TARGET_LINK_LIBRARIES(${this_target} "-lpthread") TARGET_LINK_LIBRARIES(${this_target} "-lalarm") SET_TARGET_PROPERTIES(${this_target} PROPERTIES VERSION ${FULLVER} SOVERSION ${MAJORVER} CLEAN_DIRECT_OUTPUT 1 ) INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib/osp FILES_MATCHING PATTERN "*.so*" PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ) INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/inc/ DESTINATION include/osp FILES_MATCHING PATTERN "*.h") # pkgconfig file CONFIGURE_FILE(${this_target}.pc.in ${CMAKE_SOURCE_DIR}/${this_target}.pc @ONLY) INSTALL(FILES ${CMAKE_SOURCE_DIR}/${this_target}.pc DESTINATION lib/pkgconfig)