diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2022-01-24 07:48:29 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2022-01-24 07:53:45 +0900 |
commit | 9694dc669f63efad8bd5b0268d7cddeb54ab2a6b (patch) | |
tree | 7e0da20cd1388b3c2bf1bac5453fe2a7e08be298 /screen_connector_launcher_service | |
parent | bd558f35be34c5dbd9f059b61081e8a989a7cd85 (diff) | |
download | screen-connector-9694dc669f63efad8bd5b0268d7cddeb54ab2a6b.tar.gz screen-connector-9694dc669f63efad8bd5b0268d7cddeb54ab2a6b.tar.bz2 screen-connector-9694dc669f63efad8bd5b0268d7cddeb54ab2a6b.zip |
Fix CMake configuration files
- Use ApplyPkgConfig.cmake
- Remove unnecessary project settings
- Modify directory hierarchy of unit tests
Change-Id: I349c5ee9d7e020bd2d8c9c4aa6735d9f21efe6fa
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Diffstat (limited to 'screen_connector_launcher_service')
-rw-r--r-- | screen_connector_launcher_service/CMakeLists.txt | 96 |
1 files changed, 43 insertions, 53 deletions
diff --git a/screen_connector_launcher_service/CMakeLists.txt b/screen_connector_launcher_service/CMakeLists.txt index ac0c8d6..0861f77 100644 --- a/screen_connector_launcher_service/CMakeLists.txt +++ b/screen_connector_launcher_service/CMakeLists.txt @@ -1,55 +1,45 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -PROJECT(screen_connector_launcher_service CXX) - -SET(PREFIX "${CMAKE_INSTALL_PREFIX}") -SET(PROJECT_NAME "${PROJECT_NAME}") -SET(LIBDIR ${LIB_INSTALL_DIR}) -SET(INCLUDEDIR "\${prefix}/include/${PROJECT_NAME}") -SET(VERSION_MAJOR "${MAJORVER}") -SET(VERSION "${FULLVER}") - -INCLUDE(FindPkgConfig) -pkg_check_modules(screen_connector_launcher_service REQUIRED - aul - dlog - ecore-wl2 - glib-2.0 - libtbm - tizen-remote-surface-client - tzsh-launcher-service - wayland-client - wayland-tbm-client +AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} + SCREEN_CONNECTOR_LAUNCHER_SERVICE_SRCS) + +ADD_LIBRARY(${TARGET_SCREEN_CONNECTOR_LAUNCHER_SERVICE} SHARED + ${SCREEN_CONNECTOR_LAUNCHER_SERVICE_SRCS}) + +SET_TARGET_PROPERTIES(${TARGET_SCREEN_CONNECTOR_LAUNCHER_SERVICE} + PROPERTIES SOVERSION ${MAJORVER}) +SET_TARGET_PROPERTIES(${TARGET_SCREEN_CONNECTOR_LAUNCHER_SERVICE} + PROPERTIES VERSION ${FULLVER}) +SET_TARGET_PROPERTIES(${TARGET_SCREEN_CONNECTOR_LAUNCHER_SERVICE} + PROPERTIES COMPILE_FLAGS ${CLFAGS} "-fpic") +SET_TARGET_PROPERTIES(${TARGET_SCREEN_CONNECTOR_LAUNCHER_SERVICE} + PROPERTIES LINK_FLAGS "-lpthread") + +TARGET_INCLUDE_DIRECTORIES(${TARGET_SCREEN_CONNECTOR_LAUNCHER_SERVICE} PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../ + ${CMAKE_CURRENT_SOURCE_DIR}/include) + +APPLY_PKG_CONFIG(${TARGET_SCREEN_CONNECTOR_LAUNCHER_SERVICE} PUBLIC + AUL_DEPS + DLOG_DEPS + ECORE_WL2_DEPS + GLIB_DEPS + LIBTBM_DEPS + TIZEN_REMOTE_SURFACE_CLIENT_DEPS + TZSH_LAUNCHER_SERVICE_DEPS + WAYLAND_CLIENT_DEPS + WAYLAND_TBM_CLIENT_DEPS ) -FOREACH(flag ${screen_connector_launcher_service_CFLAGS}) - SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") -ENDFOREACH(flag) -SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror -Winline") - -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -std=c++11") -SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") -SET(CMAKE_CXX_FLAGS_RELEASE "-O2") - -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) - -AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCES) -ADD_LIBRARY (${PROJECT_NAME} SHARED ${SOURCES}) - -SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION_MAJOR}) -SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION}) - -TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${screen_connector_launcher_service_LDFLAGS} "-lpthread") - -CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY) -SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROJECT_NAME}.pc") - -INSTALL(TARGETS ${PROJECT_NAME} - DESTINATION ${LIB_INSTALL_DIR}) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc - DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) -INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ - DESTINATION include/${PROJECT_NAME} - FILES_MATCHING PATTERN "*.h" - PATTERN "*_internal.h" EXCLUDE - PATTERN "*_implementation.h" EXCLUDE) +CONFIGURE_FILE(${TARGET_SCREEN_CONNECTOR_LAUNCHER_SERVICE}.pc.in + ${TARGET_SCREEN_CONNECTOR_LAUNCHER_SERVICE}.pc @ONLY) + +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_SCREEN_CONNECTOR_LAUNCHER_SERVICE}.pc + DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) +INSTALL(TARGETS ${TARGET_SCREEN_CONNECTOR_LAUNCHER_SERVICE} + DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries) +INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include + DESTINATION include/${TARGET_SCREEN_CONNECTOR_LAUNCHER_SERVICE} + FILES_MATCHING + PATTERN "*.h" + PATTERN "*_internal.h" EXCLUDE + PATTERN "*_implementation.h" EXCLUDE) |