1 ########################## search for packages ################################
3 PKG_CHECK_MODULES(UWB_DEPS REQUIRED ${COMMON_DEPS})
5 ############################# compiler flags ##################################
7 SET(EXTRA_FLAGS "-fPIC -Wall -Werror -fvisibility=hidden")
8 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_FLAGS}")
9 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lpthread -pie")
11 ######################## directory configuration ############################
13 INCLUDE_DIRECTORIES(${UWB_DEPS_INCLUDE_DIRS})
14 LINK_DIRECTORIES(${UWB_DEPS_LIBRARY_DIRS})
16 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/include)
17 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
19 MESSAGE(" - Generating...d-bus code")
20 FIND_PROGRAM(GDBUS_CODEGEN NAMES gdbus-codegen)
21 EXEC_PROGRAM(${GDBUS_CODEGEN} ARGS
23 --generate-c-code ${CMAKE_SOURCE_DIR}/src/uwb-gdbus \\
24 --interface-prefix org.tizen.uwb. \\
25 ${CMAKE_SOURCE_DIR}/src/uwb-gdbuslib.xml \\
34 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
35 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${UWB_DEPS_LIBRARIES})
36 SET_TARGET_PROPERTIES(${PROJECT_NAME}
43 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_DIR})