CMAKE_MINIMUM_REQUIRED(VERSION 2.6) SET(CMAKE_INSTALL_PREFIX /usr) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) ## OUTPUT PATHS SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output/osp) SET(ROOT_DIR ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output) ## Disable build rpath SET(CMAKE_SKIP_BUILD_RPATH TRUE) IF(SBS OR OBS) ADD_DEFINITIONS("-D_EXCEPT_DEPENDENCY_") ENDIF(SBS OR OBS) IF(SBS) ADD_DEFINITIONS("-D_SBS_") ENDIF(SBS) ## Set Assembly Compiler #SET(CMAKE_ASM_COMPILER "${CMAKE_C_COMPILER}") SET(CMAKE_ASM_COMPILER_ARG1 "${CPPFLAGS} -c") ENABLE_LANGUAGE(ASM) ## LIBRARY PATH LINK_DIRECTORIES (${LIBRARY_OUTPUT_PATH}) ADD_SUBDIRECTORY(src) INSTALL(FILES ${CMAKE_SOURCE_DIR}/osp-appfw.pc DESTINATION lib/pkgconfig) INSTALL(FILES ${CMAKE_SOURCE_DIR}/osp-appfw-server.pc DESTINATION lib/pkgconfig) INSTALL(FILES ${CMAKE_SOURCE_DIR}/osp-system-server.pc DESTINATION lib/pkgconfig) INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/common/etc/ld.so.conf.d/osp.conf DESTINATION ../etc/ld.so.conf.d) INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output/target/generic/root/usr/share/locale DESTINATION share) INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib/osp FILES_MATCHING PATTERN "libosp-appfw.so*" PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ) INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib/osp FILES_MATCHING PATTERN "libosp-newlib.so*" PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ) INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib/osp-server FILES_MATCHING PATTERN "libosp-appfw-server.so*" PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ) INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib/osp-server FILES_MATCHING PATTERN "libosp-system-server.so*" PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ) INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/common/opt/usr/etc DESTINATION ../opt/usr) IF("${ARCH}" MATCHES "arm") INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/arm/usr/etc DESTINATION ../usr) ELSEIF("${ARCH}" MATCHES "x86") INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/x86/usr/etc DESTINATION ../usr) ENDIF("${ARCH}" MATCHES "arm") INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/inc/ DESTINATION include/osp FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp") INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/app/inc/ DESTINATION include/osp/app FILES_MATCHING PATTERN "*.h") INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/base/inc/ DESTINATION include/osp/base FILES_MATCHING PATTERN "*.h") INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/io/inc/ DESTINATION include/osp/io FILES_MATCHING PATTERN "*.h") INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/locales/inc/ DESTINATION include/osp/locales FILES_MATCHING PATTERN "*.h") INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/security/inc/ DESTINATION include/osp/security FILES_MATCHING PATTERN "*.h") INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/system/inc/ DESTINATION include/osp/system FILES_MATCHING PATTERN "*.h") INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/text/inc/ DESTINATION include/osp/text FILES_MATCHING PATTERN "*.h") INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/server/inc/ DESTINATION include/osp/server/ FILES_MATCHING PATTERN "*.h") INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/system-server/inc/ DESTINATION include/osp/system-server/ FILES_MATCHING PATTERN "*.h")