diff --git a/package/libgluonutil/src/CMakeLists.txt b/package/libgluonutil/src/CMakeLists.txt index ba92a3e1..7df17b1a 100644 --- a/package/libgluonutil/src/CMakeLists.txt +++ b/package/libgluonutil/src/CMakeLists.txt @@ -1,24 +1,15 @@ cmake_minimum_required(VERSION 2.6) -set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) - project(libgluonutil C) -set(LIBDIR "lib${LIB_SUFFIX}") - -find_package(JSON_C REQUIRED) - set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS _GNU_SOURCE) add_library(gluonutil SHARED libgluonutil.c) -set_property(TARGET gluonutil PROPERTY COMPILE_FLAGS "-Wall -std=c99 ${JSON_C_CFLAGS_OTHER}") -set_property(TARGET gluonutil PROPERTY LINK_FLAGS "${JSON_C_LDFLAGS_OTHER}") -set_property(TARGET gluonutil APPEND PROPERTY INCLUDE_DIRECTORIES ${JSON_C_INCLUDE_DIR}) -target_link_libraries(gluonutil ${JSON_C_LIBRARIES}) +set_property(TARGET gluonutil PROPERTY COMPILE_FLAGS "-Wall -std=c99") +target_link_libraries(gluonutil json-c) install(TARGETS gluonutil - ARCHIVE DESTINATION ${LIBDIR} - LIBRARY DESTINATION ${LIBDIR} + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib ) - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/libgluonutil.h DESTINATION include) diff --git a/package/libgluonutil/src/FindJSON_C.cmake b/package/libgluonutil/src/FindJSON_C.cmake deleted file mode 100644 index f6abee65..00000000 --- a/package/libgluonutil/src/FindJSON_C.cmake +++ /dev/null @@ -1,20 +0,0 @@ -# Defines the following variables: -# JSON_C_FOUND -# JSON_C_INCLUDE_DIR -# JSON_C_LIBRARIES -# JSON_C_CFLAGS_OTHER -# JSON_C_LDFLAGS_OTHER - - -find_package(PkgConfig REQUIRED QUIET) - -pkg_check_modules(_JSON_C json-c) - -find_path(JSON_C_INCLUDE_DIR NAMES json-c/json.h HINTS ${_JSON_C_INCLUDE_DIRS}) -find_library(JSON_C_LIBRARIES NAMES json-c HINTS ${_JSON_C_LIBRARY_DIRS}) - -set(JSON_C_CFLAGS_OTHER "${_JSON_C_CFLAGS_OTHER}" CACHE STRING "Additional compiler flags for json-c") -set(JSON_C_LDFLAGS_OTHER "${_JSON_C_LDFLAGS_OTHER}" CACHE STRING "Additional linker flags for json-c") - -find_package_handle_standard_args(JSON_C REQUIRED_VARS JSON_C_LIBRARIES JSON_C_INCLUDE_DIR) -mark_as_advanced(JSON_C_INCLUDE_DIR JSON_C_LIBRARIES JSON_C_CFLAGS_OTHER JSON_C_LDFLAGS_OTHER)