CMakeListsStaticInclude.txt 1.42 KB
Newer Older
1 2 3 4 5 6
#
# To build ACGL as a library, use the CMakeLists.txt
# To build it statically into a project just include this file,
# e.g.: INCLUDE(${CMAKE_SOURCE_DIR}/extern/acgl/CMakeListsStaticInclude.txt)
#

7
SET(ACGL_BASE_DIR "${CMAKE_CURRENT_LIST_DIR}")
8
# Find all used files of certain file-types
9 10 11 12 13 14
FILE(GLOB_RECURSE SOURCE_FILES_C   "${ACGL_BASE_DIR}/src/*.c")
FILE(GLOB_RECURSE SOURCE_FILES_CC  "${ACGL_BASE_DIR}/src/*.cc")
FILE(GLOB_RECURSE SOURCE_FILES_CPP "${ACGL_BASE_DIR}/src/*.cpp")
FILE(GLOB_RECURSE HEADER_FILES_H   "${ACGL_BASE_DIR}/include/*.h")
FILE(GLOB_RECURSE HEADER_FILES_HH  "${ACGL_BASE_DIR}/include/*.hh")
FILE(GLOB_RECURSE HEADER_FILES_HPP "${ACGL_BASE_DIR}/include/*.hpp")
15 16 17
#group files in msvc
RECURSE_GROUPS ("${ACGL_BASE_DIR}/include")
RECURSE_GROUPS ("${ACGL_BASE_DIR}/src")
18 19 20 21 22

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})

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_LIST_DIR}/include)
23 24 25 26 27 28 29 30 31 32 33

# set debug build with: cmake -DCMAKE_BUILD_TYPE=Debug ...
IF(CMAKE_BUILD_TYPE MATCHES Debug)
    ADD_DEFINITIONS(-DDEBUG)
ENDIF(CMAKE_BUILD_TYPE MATCHES Debug)
IF(CMAKE_BUILD_TYPE MATCHES debug)
    ADD_DEFINITIONS(-DDEBUG)
ENDIF(CMAKE_BUILD_TYPE MATCHES debug)
IF(CMAKE_BUILD_TYPE MATCHES DEBUG)
    ADD_DEFINITIONS(-DDEBUG)
ENDIF(CMAKE_BUILD_TYPE MATCHES DEBUG)
Robert Menzel's avatar
Robert Menzel committed
34 35 36 37

IF(WIN32)
    ADD_DEFINITIONS(-DWIN32)
ENDIF(WIN32)