CMakeLists.txt 1.12 KB
Newer Older
BRAMAS Berenger's avatar
BRAMAS Berenger committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
###########################################################################
# SPETABARU - Berenger Bramas MPCDF - 2016
# Under MIT Licence, please you must read the LICENCE file.
###########################################################################
project(LIB_SPETABARU CXX)

ADD_DEFINITIONS(${SPETABARU_CXX_FLAGS})

# Adding the entire project dir as an include dir
INCLUDE_DIRECTORIES(
     ${CMAKE_CURRENT_SOURCE_DIR}
     ${CMAKE_CURRENT_BINARY_DIR}
)

file(
    GLOB_RECURSE 	 	 	 	
 	hpp_in_dir
	./*.hpp ./*.h
)
FOREACH(hpp_file ${hpp_in_dir})	
    file(RELATIVE_PATH relative_hpp_file ${CMAKE_CURRENT_SOURCE_DIR} ${hpp_file})
    if(SPETABARU_DO_INSTALL)
        INSTALL( FILES ${hpp_file} DESTINATION include/${relative_hpp_file} )
    endif()

    if($ENV{VERBOSE})
        MESSAGE(STATUS "Src -- Add ${relative_hpp_file}")
    endif()
ENDFOREACH()

if(SPETABARU_DO_INSTALL)
    INSTALL( FILES "${SPETABARU_BINARY_DIR}/Src/SPETABARUConfig.h" DESTINATION include/Src )
endif()


# Searching all cpp file
file(
	GLOB_RECURSE
	source_lib_files
	./*.cpp
)

# Adding cpp files to project
add_library(
	spetabaru
	${source_lib_files}
)