Skip to content

Commit

Permalink
fix for enabling build of RPM packages
Browse files Browse the repository at this point in the history
remove include(CompilerChecks.cmake) and all pkgconfig and install
stuff.
Build just a static library.
  • Loading branch information
fcomida committed Aug 13, 2019
1 parent ac32037 commit 0612341
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 53 deletions.
3 changes: 1 addition & 2 deletions librtprocess/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
51 changes: 0 additions & 51 deletions librtprocess/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
find_package(PkgConfig)

if (OPTION_OMP)
find_package(OpenMP REQUIRED COMPONENTS CXX)
endif()
Expand All @@ -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
Expand Down Expand Up @@ -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()

0 comments on commit 0612341

Please sign in to comment.