some more fixes for the static library configuration

This commit is contained in:
Vadim Pisarevsky 2010-12-05 02:10:59 +00:00
parent 0de9c9fd3c
commit 9dfb15dbbd
8 changed files with 28 additions and 10 deletions

View File

@ -62,13 +62,8 @@ set_target_properties(${the_target}
)
if(NOT BUILD_SHARED_LIBS)
set_target_properties(${the_target}
PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
install(TARGETS ${the_target}
RUNTIME DESTINATION bin COMPONENT main
LIBRARY DESTINATION lib COMPONENT main
ARCHIVE DESTINATION lib COMPONENT main)
ARCHIVE DESTINATION share/opencv/3rdparty/lib COMPONENT main)
endif()
endif() #android

View File

@ -57,4 +57,10 @@ set_target_properties(${the_target}
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/3rdparty/lib"
)
if(NOT BUILD_SHARED_LIBS)
install(TARGETS ${the_target}
ARCHIVE DESTINATION share/opencv/3rdparty/lib COMPONENT main)
endif()
endif(ANDROID)#!android

View File

@ -47,4 +47,10 @@ set_target_properties(${the_target}
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/3rdparty/lib
)
if(NOT BUILD_SHARED_LIBS)
install(TARGETS ${the_target}
ARCHIVE DESTINATION share/opencv/3rdparty/lib COMPONENT main)
endif()
endif()#android

View File

@ -41,4 +41,10 @@ set_target_properties(${the_target}
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/3rdparty/lib"
)
if(NOT BUILD_SHARED_LIBS)
install(TARGETS ${the_target}
ARCHIVE DESTINATION share/opencv/3rdparty/lib COMPONENT main)
endif()
endif()#android

View File

@ -99,3 +99,8 @@ set_target_properties(${the_target}
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/3rdparty/lib/"
)
if(NOT BUILD_SHARED_LIBS)
install(TARGETS ${the_target}
ARCHIVE DESTINATION share/opencv/3rdparty/lib COMPONENT main)
endif()

View File

@ -40,10 +40,8 @@ set_target_properties(${the_target}
)
if(NOT BUILD_SHARED_LIBS)
set_target_properties(${the_target}
PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
install(TARGETS ${the_target}
ARCHIVE DESTINATION lib COMPONENT main)
ARCHIVE DESTINATION share/opencv/3rdparty/lib COMPONENT main)
endif()
endif(ANDROID)

View File

@ -490,7 +490,7 @@ if(WITH_JASPER AND NOT JASPER_FOUND)
set(JASPER_LIBRARIES libjasper)
endif()
message(STATUS "Graphic libraries: ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${JASPER_LIBRARIES}")
#message(STATUS "Graphic libraries: ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${JASPER_LIBRARIES}")
if(WITH_OPENEXR)
include(OpenCVFindOpenEXR.cmake)

View File

@ -85,6 +85,8 @@ IF (NOT @OPENCV_BUILD_SHARED_LIB@)
LINK_DIRECTORIES(@CMAKE_LIB_DIRS_CONFIGCMAKE@/../3rdparty/lib)
if(WIN32)
LINK_DIRECTORIES(@CMAKE_BASE_INCLUDE_DIRS_CONFIGCMAKE@/3rdparty/lib)
else()
LINK_DIRECTORIES(@CMAKE_LIB_DIRS_CONFIGCMAKE@/../share/opencv/3rdparty/lib)
endif()
set(OpenCV_LIBS @OPENCV_LINKER_LIBS@ @IPP_LIBS@ @HIGHGUI_LIBRARIES@ ${OpenCV_LIBS})