From 061234193a8d540c54269b9f25efba0a80656814 Mon Sep 17 00:00:00 2001 From: Franco Comida Date: Tue, 13 Aug 2019 18:02:50 +0200 Subject: [PATCH] fix for enabling build of RPM packages remove include(CompilerChecks.cmake) and all pkgconfig and install stuff. Build just a static library. --- librtprocess/CMakeLists.txt | 3 +- librtprocess/src/CMakeLists.txt | 51 --------------------------------- 2 files changed, 1 insertion(+), 53 deletions(-) diff --git a/librtprocess/CMakeLists.txt b/librtprocess/CMakeLists.txt index aa6673443..70b350c62 100644 --- a/librtprocess/CMakeLists.txt +++ b/librtprocess/CMakeLists.txt @@ -10,10 +10,8 @@ include(DefineCompilerFlags) # include cmake files include(DefineOptions.cmake) -include(CompilerChecks.cmake) add_subdirectory(src) -add_subdirectory(pkgconfig) ADD_LIBRARY(librtprocess STATIC ${CMAKE_CURRENT_SOURCE_DIR}/src/demosaic/ahd.cc ${CMAKE_CURRENT_SOURCE_DIR}/src/demosaic/amaze.cc @@ -27,5 +25,6 @@ ADD_LIBRARY(librtprocess STATIC ${CMAKE_CURRENT_SOURCE_DIR}/src/demosaic/ahd.cc ${CMAKE_CURRENT_SOURCE_DIR}/src/demosaic/rcd.cc ${CMAKE_CURRENT_SOURCE_DIR}/src/demosaic/vng4.cc ${CMAKE_CURRENT_SOURCE_DIR}/src/demosaic/xtransfast.cc) + SET(LUMINANCE_MODULES_CLI ${LUMINANCE_MODULES_CLI} librtprocess PARENT_SCOPE) SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} librtprocess PARENT_SCOPE) diff --git a/librtprocess/src/CMakeLists.txt b/librtprocess/src/CMakeLists.txt index d6ad75fd1..53ebfee80 100644 --- a/librtprocess/src/CMakeLists.txt +++ b/librtprocess/src/CMakeLists.txt @@ -1,5 +1,3 @@ -find_package(PkgConfig) - if (OPTION_OMP) find_package(OpenMP REQUIRED COMPONENTS CXX) endif() @@ -20,45 +18,6 @@ set(rtprocess_SRCS preprocess/CA_correct.cc postprocess/hilite_recon.cc) -add_library(rtprocess SHARED ${rtprocess_SRCS}) -target_include_directories(rtprocess - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/include - ) -target_compile_options(rtprocess - PRIVATE - ${OpenMP_CXX_FLAGS} - ${DEFAULT_CXX_COMPILE_FLAGS} - ${OpenMP_CXX_FLAGS} - ${PROC_FLAGS}) -set_property(TARGET - rtprocess - PROPERTY - LINKER_FLAGS "${DEFAULT_LINK_FLAGS}" - PROPERTY - PUBLIC_HEADER "include/librtprocess.h") - -if (OpenMP_FOUND) - target_link_libraries(rtprocess PRIVATE ${OpenMP_CXX_LIBRARIES}) -endif() - -if (VERBOSE) - target_compile_options(rtprocess - PRIVATE - -DVERBOSE) -endif() - -install(TARGETS rtprocess - ARCHIVE - DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY - DESTINATION ${CMAKE_INSTALL_LIBDIR} - COMPONENT ${PROJECT_NAME} - RUNTIME - DESTINATION ${CMAKE_INSTALL_BINDIR} - PUBLIC_HEADER - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rtprocess) - if (WITH_STATIC_LIB) add_library(rtprocess_static STATIC ${rtprocess_SRCS}) target_include_directories(rtprocess_static @@ -90,14 +49,4 @@ if (WITH_STATIC_LIB) -DVERBOSE) endif() - install(TARGETS rtprocess_static - ARCHIVE - DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY - DESTINATION ${CMAKE_INSTALL_LIBDIR} - COMPONENT ${PROJECT_NAME} - RUNTIME - DESTINATION ${CMAKE_INSTALL_BINDIR} - PUBLIC_HEADER - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rtprocess) endif()