Commit 5cf28612 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke

Changed ${CMAKE_SOURCE_DIR} into ${CMAKE_CURRENT_SOURCE_DIR}. Allows for...

Changed ${CMAKE_SOURCE_DIR} into ${CMAKE_CURRENT_SOURCE_DIR}. Allows for inclusion into super projects.
parent 63ab534c
# #
# Use this to compile ACGL as a library. To include it statically compiled into # Use this to compile ACGL as a library. To include it statically compiled into
# your own project you can also just include the CMakeListsStaticInclude.txt: # your own project you can also just include the CMakeListsStaticInclude.txt:
# INCLUDE(${CMAKE_SOURCE_DIR}/CMakeListsStaticInclude.txt) # INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeListsStaticInclude.txt)
# #
CMAKE_MINIMUM_REQUIRED (VERSION 2.6) CMAKE_MINIMUM_REQUIRED (VERSION 2.6)
...@@ -11,11 +11,11 @@ CMAKE_MINIMUM_REQUIRED (VERSION 2.6) ...@@ -11,11 +11,11 @@ CMAKE_MINIMUM_REQUIRED (VERSION 2.6)
# Name of the Project # Name of the Project
PROJECT(ACGL) PROJECT(ACGL)
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/CompileOptions.txt) INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/CompileOptions.txt)
# Specify dependencies # Specify dependencies
SET(NEED_ACGL_GLOBAL_EXTERN_DIR TRUE) SET(NEED_ACGL_GLOBAL_EXTERN_DIR TRUE)
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/GlobalAndLocalExternACGL.txt) INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/GlobalAndLocalExternACGL.txt)
# OpenGL Support # OpenGL Support
IF(NOT DEFINED ACGL_OPENGL_SUPPORT) IF(NOT DEFINED ACGL_OPENGL_SUPPORT)
...@@ -40,7 +40,7 @@ ENDIF() ...@@ -40,7 +40,7 @@ ENDIF()
################################################################################ ################################################################################
# Where to find the cmake finders? # Where to find the cmake finders?
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
# Target directory # Target directory
SET(LIBRARY_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/lib") SET(LIBRARY_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/lib")
...@@ -59,7 +59,7 @@ INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeListsStaticInclude.txt) ...@@ -59,7 +59,7 @@ INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeListsStaticInclude.txt)
# Defines # Defines
################################################################################ ################################################################################
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/DefinesACGL.txt) INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/DefinesACGL.txt)
ADD_DEFINITIONS(${ACGL_DEFINES}) ADD_DEFINITIONS(${ACGL_DEFINES})
################################################################################ ################################################################################
......
...@@ -4,13 +4,14 @@ ...@@ -4,13 +4,14 @@
# e.g.: INCLUDE(${CMAKE_SOURCE_DIR}/extern/acgl/CMakeListsStaticInclude.txt) # e.g.: INCLUDE(${CMAKE_SOURCE_DIR}/extern/acgl/CMakeListsStaticInclude.txt)
# #
SET(ACGL_BASE_DIR "${CMAKE_CURRENT_LIST_DIR}")
# Find all used files of certain file-types # Find all used files of certain file-types
FILE(GLOB_RECURSE SOURCE_FILES_C "${CMAKE_CURRENT_LIST_DIR}/src/*.c") FILE(GLOB_RECURSE SOURCE_FILES_C "${ACGL_BASE_DIR}/src/*.c")
FILE(GLOB_RECURSE SOURCE_FILES_CC "${CMAKE_CURRENT_LIST_DIR}/src/*.cc") FILE(GLOB_RECURSE SOURCE_FILES_CC "${ACGL_BASE_DIR}/src/*.cc")
FILE(GLOB_RECURSE SOURCE_FILES_CPP "${CMAKE_CURRENT_LIST_DIR}/src/*.cpp") FILE(GLOB_RECURSE SOURCE_FILES_CPP "${ACGL_BASE_DIR}/src/*.cpp")
FILE(GLOB_RECURSE HEADER_FILES_H "${CMAKE_CURRENT_LIST_DIR}/include/*.h") FILE(GLOB_RECURSE HEADER_FILES_H "${ACGL_BASE_DIR}/include/*.h")
FILE(GLOB_RECURSE HEADER_FILES_HH "${CMAKE_CURRENT_LIST_DIR}/include/*.hh") FILE(GLOB_RECURSE HEADER_FILES_HH "${ACGL_BASE_DIR}/include/*.hh")
FILE(GLOB_RECURSE HEADER_FILES_HPP "${CMAKE_CURRENT_LIST_DIR}/include/*.hpp") FILE(GLOB_RECURSE HEADER_FILES_HPP "${ACGL_BASE_DIR}/include/*.hpp")
SET(HEADER_FILES ${HEADER_FILES} ${HEADER_FILES_H} ${HEADER_FILES_HH} ${HEADER_FILES_HPP}) SET(HEADER_FILES ${HEADER_FILES} ${HEADER_FILES_H} ${HEADER_FILES_HH} ${HEADER_FILES_HPP})
SET(SOURCE_FILES ${SOURCE_FILES} ${SOURCE_FILES_C} ${SOURCE_FILES_CC} ${SOURCE_FILES_CPP}) SET(SOURCE_FILES ${SOURCE_FILES} ${SOURCE_FILES_C} ${SOURCE_FILES_CC} ${SOURCE_FILES_CPP})
......
cmake @ 7c0af24a
Subproject commit 2ab8ddba5b6c77730193e734bfb63cc45ac93e77 Subproject commit 7c0af24a1217acf415769e0ac5d2861a2637e698
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment