Skip to content

Commit

Permalink
Replacing cmake source variables with cmake CURRENT source variables …
Browse files Browse the repository at this point in the history
…for correct relative paths when libcitygml is not build from the original CMakeLists but as a subdirectory
  • Loading branch information
Dipl.-Ing. Jonas Stienen committed Apr 18, 2018
1 parent 704e1b9 commit e3c565c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(META_VERSION_PATCH "8")

set(META_VERSION "${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH}")

SET( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules" )
SET( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules" )

IF(WIN32)

Expand Down Expand Up @@ -197,7 +197,7 @@ IF(UNIX AND NOT APPLE)
set(CPACK_PACKAGE_VERSION_MAJOR "${META_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${META_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${META_VERSION_PATCH}")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_RELOCATABLE OFF)

# Debian package information
Expand Down
2 changes: 1 addition & 1 deletion osgplugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ find_package( OpenSceneGraph REQUIRED osgDB osgViewer osgGA osgUtil osgText)

include_directories(
${OPENSCENEGRAPH_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/sources/include
${CMAKE_CURRENT_SOURCE_DIR}/../sources/include
)

set( sources ReaderWriterCityGML.cpp )
Expand Down
2 changes: 1 addition & 1 deletion sources/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include(GenerateExportHeader)

IF (NOT DEFINED CMAKE_MODULE_PATH)
GET_FILENAME_COMPONENT(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../CMakeModules" ABSOLUTE)
GET_FILENAME_COMPONENT(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../CMakeModules" ABSOLUTE)
ENDIF (NOT DEFINED CMAKE_MODULE_PATH)

SET( target citygml )
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ELSE( LIBCITYGML_DYNAMIC )
ENDIF( LIBCITYGML_DYNAMIC )

# INCLUDE_DIRECTORIES( ${CITYGML_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/sources/include ${CMAKE_BINARY_DIR}/sources/include)
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../sources/include ${CMAKE_BINARY_DIR}/sources/include)

SET( PRG_SRCS citygmltest.cpp )

Expand Down

0 comments on commit e3c565c

Please sign in to comment.