SET (this_target osp-system-server) INCLUDE_DIRECTORIES ( ${SLP_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/inc ${CMAKE_SOURCE_DIR}/src/system-server/inc ) SET (${this_target}_SOURCE_FILES system/FSys_SystemInfo.cpp ) ## SET EXTRA COMPILER FLAGS SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIC -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}) TARGET_LINK_LIBRARIES(${this_target} osp-appfw) SET_TARGET_PROPERTIES(${this_target} PROPERTIES VERSION ${FULLVER} SOVERSION ${MAJORVER} CLEAN_DIRECT_OUTPUT 1 ) ADD_CUSTOM_COMMAND(TARGET ${this_target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER} COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${MAJORVER} COMMAND ${CMAKE_STRIP} --strip-unneeded ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX} COMMENT "strip ${this_target}" ) SET(PC_NAME ${this_target}) SET(PC_REQUIRED ${pc_requires}) SET(PC_LDFLAGS -l${this_target}) # pkgconfig file CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/${this_target}.pc.in ${CMAKE_SOURCE_DIR}/${this_target}.pc @ONLY)