Fix installation
This commit is contained in:
parent
306e58761a
commit
0c69d6e1a8
|
@ -39,6 +39,37 @@ SET(OPENJPEG_LIBRARY_PROPERTIES
|
||||||
VERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}"
|
VERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}"
|
||||||
SOVERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}"
|
SOVERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}"
|
||||||
)
|
)
|
||||||
|
# You will also need to define a value for the following variables:
|
||||||
|
# OPENJPEG_INSTALL_BIN_DIR - binary dir (executables)
|
||||||
|
# OPENJPEG_INSTALL_LIB_DIR - library dir (libs)
|
||||||
|
# OPENJPEG_INSTALL_DATA_DIR - share dir (say, examples, data, etc)
|
||||||
|
# OPENJPEG_INSTALL_INCLUDE_DIR - include dir (headers)
|
||||||
|
|
||||||
|
# --------------------------------------------------------------------------
|
||||||
|
# Install directories
|
||||||
|
|
||||||
|
STRING(TOLOWER ${PROJECT_NAME} projectname)
|
||||||
|
SET(subdir "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
|
||||||
|
|
||||||
|
IF(NOT OPENJPEG_INSTALL_BIN_DIR)
|
||||||
|
SET(OPENJPEG_INSTALL_BIN_DIR "bin")
|
||||||
|
ENDIF(NOT OPENJPEG_INSTALL_BIN_DIR)
|
||||||
|
|
||||||
|
IF(NOT OPENJPEG_INSTALL_LIB_DIR)
|
||||||
|
SET(OPENJPEG_INSTALL_LIB_DIR "lib")
|
||||||
|
ENDIF(NOT OPENJPEG_INSTALL_LIB_DIR)
|
||||||
|
|
||||||
|
IF(NOT OPENJPEG_INSTALL_DATA_DIR)
|
||||||
|
SET(OPENJPEG_INSTALL_DATA_DIR "share/${subdir}")
|
||||||
|
ENDIF(NOT OPENJPEG_INSTALL_DATA_DIR)
|
||||||
|
|
||||||
|
IF(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
|
||||||
|
SET(OPENJPEG_INSTALL_INCLUDE_DIR "include/${subdir}")
|
||||||
|
ENDIF(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
|
||||||
|
|
||||||
|
IF(NOT OPENJPEG_INSTALL_DOC_DIR)
|
||||||
|
SET(OPENJPEG_INSTALL_DOC_DIR "share/doc/${subdir}")
|
||||||
|
ENDIF(NOT OPENJPEG_INSTALL_DOC_DIR)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Test for some required system information.
|
# Test for some required system information.
|
||||||
|
@ -111,7 +142,7 @@ IF(BUILD_DOCUMENTATION)
|
||||||
ENDIF(BUILD_DOCUMENTATION)
|
ENDIF(BUILD_DOCUMENTATION)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# For openjpeg team if they ever want Dart+CMake
|
# For openjpeg team if they ever want CDash+CMake
|
||||||
OPTION(BUILD_TESTING "Build the tests." OFF)
|
OPTION(BUILD_TESTING "Build the tests." OFF)
|
||||||
IF(BUILD_TESTING)
|
IF(BUILD_TESTING)
|
||||||
ENABLE_TESTING()
|
ENABLE_TESTING()
|
||||||
|
|
|
@ -10,6 +10,7 @@ Jun 21, 2010
|
||||||
* [MM] Remove some warnings in code
|
* [MM] Remove some warnings in code
|
||||||
* [MM] j2k_to_image properly return error code
|
* [MM] j2k_to_image properly return error code
|
||||||
* [MM] increase coverage by testing all codecs
|
* [MM] increase coverage by testing all codecs
|
||||||
|
* [MM] fix installation. Place in subfolder to handle both API
|
||||||
|
|
||||||
April 8, 2010
|
April 8, 2010
|
||||||
* [FOD] Fixed problem with Borland C++ Builder (Borland C do not have lrintf). Thanks Marek Mauder for this fix.
|
* [FOD] Fixed problem with Borland C++ Builder (Borland C do not have lrintf). Thanks Marek Mauder for this fix.
|
||||||
|
|
|
@ -70,8 +70,10 @@ ENDIF(UNIX)
|
||||||
|
|
||||||
# Install library
|
# Install library
|
||||||
INSTALL(TARGETS ${OPENJPEG_LIBRARY_NAME}
|
INSTALL(TARGETS ${OPENJPEG_LIBRARY_NAME}
|
||||||
DESTINATION lib)
|
DESTINATION ${OPENJPEG_INSTALL_LIB_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
# Install includes files
|
# Install includes files
|
||||||
INSTALL(FILES openjpeg.h
|
INSTALL(FILES openjpeg.h
|
||||||
DESTINATION ${INCLUDE_INSTALL_DIR}/openjpeg)
|
DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
|
|
@ -24,7 +24,5 @@ FOREACH(exe test2_encoder test2_decoder)
|
||||||
ADD_EXECUTABLE(${exe} ${exe}.c)
|
ADD_EXECUTABLE(${exe} ${exe}.c)
|
||||||
TARGET_LINK_LIBRARIES(${exe} ${OPJ_PREFIX}openjpeg)
|
TARGET_LINK_LIBRARIES(${exe} ${OPJ_PREFIX}openjpeg)
|
||||||
TARGET_LINK_LIBRARIES(${exe} ${FREEIMAGE_LIBRARIES})
|
TARGET_LINK_LIBRARIES(${exe} ${FREEIMAGE_LIBRARIES})
|
||||||
# Install exe
|
|
||||||
INSTALL_TARGETS(/bin/ ${exe})
|
|
||||||
ENDFOREACH(exe)
|
ENDFOREACH(exe)
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,5 @@ ENDIF(NOT BUILD_SHARED_LIBS)
|
||||||
FOREACH(exe test_encoder test_decoder)
|
FOREACH(exe test_encoder test_decoder)
|
||||||
ADD_EXECUTABLE(${exe} ${exe}.c)
|
ADD_EXECUTABLE(${exe} ${exe}.c)
|
||||||
TARGET_LINK_LIBRARIES(${exe} ${OPJ_PREFIX}openjpeg)
|
TARGET_LINK_LIBRARIES(${exe} ${OPJ_PREFIX}openjpeg)
|
||||||
# Install exe
|
|
||||||
INSTALL_TARGETS(/bin/ ${exe})
|
|
||||||
ENDFOREACH(exe)
|
ENDFOREACH(exe)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue