diff --git a/CMakeLists.txt b/CMakeLists.txt index b2c00581..1a93bbe5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,12 +87,6 @@ SET(OUTPUT_LIBDIR ${PROJECT_BINARY_DIR}/lib) MAKE_DIRECTORY(${OUTPUT_LIBDIR}) SET(LIBRARY_OUTPUT_PATH ${OUTPUT_LIBDIR}) -if(NOT DEFINED BIN_INSTALL_DIR) - set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin") -endif(NOT DEFINED BIN_INSTALL_DIR) -if(NOT DEFINED LIB_INSTALL_DIR) - set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib") -endif(NOT DEFINED LIB_INSTALL_DIR) if(NOT DEFINED DATA_INSTALL_DIR) set(DATA_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share") endif(NOT DEFINED DATA_INSTALL_DIR) diff --git a/sources/CMakeLists.txt b/sources/CMakeLists.txt index 87bdd4eb..c9ff987b 100644 --- a/sources/CMakeLists.txt +++ b/sources/CMakeLists.txt @@ -248,12 +248,6 @@ set_target_properties( ${target} PROPERTIES SOVERSION ${META_VERSION_MAJOR} ) -if(NOT DEFINED BIN_INSTALL_DIR) - set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin") -endif(NOT DEFINED BIN_INSTALL_DIR) -if(NOT DEFINED LIB_INSTALL_DIR) - set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib") -endif(NOT DEFINED LIB_INSTALL_DIR) if(NOT DEFINED INCLUDE_INSTALL_DIR) set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/citygml") endif(NOT DEFINED INCLUDE_INSTALL_DIR) @@ -261,15 +255,15 @@ endif(NOT DEFINED INCLUDE_INSTALL_DIR) if(WIN32) set(CONFIG_INSTALL_DIR "cmake") else() - set(CONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/citygml") + set(CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/citygml") endif() INSTALL( TARGETS ${target} EXPORT citygmlConfigInternal - RUNTIME DESTINATION ${BIN_INSTALL_DIR} - LIBRARY DESTINATION ${LIB_INSTALL_DIR} - ARCHIVE DESTINATION ${LIB_INSTALL_DIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT "runtime" ) INSTALL( @@ -331,7 +325,7 @@ configure_file(citygml.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/citygml.pc) INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/citygml.pc - DESTINATION ${LIB_INSTALL_DIR}/pkgconfig + DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT "development" ) diff --git a/sources/citygml.pc.cmake b/sources/citygml.pc.cmake index 0859b276..52e8d1b9 100644 --- a/sources/citygml.pc.cmake +++ b/sources/citygml.pc.cmake @@ -1,11 +1,11 @@ prefix=${CMAKE_INSTALL_PREFIX} -exec_prefix=${BIN_INSTALL_DIR} -libdir=${LIB_INSTALL_DIR} +exec_prefix=${CMAKE_INSTALL_BINDIR} +libdir=${CMAKE_INSTALL_LIBDIR} includedir=${INCLUDE_INSTALL_DIR} Name: citygml Description: Read and Write CityGML files Requires: ${PKG_CONFIG_REQUIRES} Version: ${META_VERSION} -Libs: -L${LIB_INSTALL_DIR} -lcitygml${LIBCITYGML_POSTFIX} +Libs: -L${CMAKE_INSTALL_LIBDIR} -lcitygml${LIBCITYGML_POSTFIX} Cflags: -I${INCLUDE_INSTALL_DIR} diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a9b7aaf7..85ce5053 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -33,11 +33,7 @@ IF(LIBCITYGML_USE_OPENGL) TARGET_LINK_LIBRARIES( citygmltest citygml ${OPENGL_LIBRARIES} ) ENDIF(LIBCITYGML_USE_OPENGL) -if(NOT DEFINED BIN_INSTALL_DIR) - set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin") -endif(NOT DEFINED BIN_INSTALL_DIR) - -install(TARGETS citygmltest RUNTIME DESTINATION ${BIN_INSTALL_DIR}) +install(TARGETS citygmltest RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) add_test(NAME berlin_open_data_sample_data COMMAND citygmltest ../../data/berlin_open_data_sample_data.citygml)