CMakeLists.txt 1013 Bytes
Newer Older
BRAMAS Berenger's avatar
BRAMAS Berenger committed
1 2
###########################################################################
# SPETABARU - Berenger Bramas MPCDF - 2016
BRAMAS Berenger's avatar
BRAMAS Berenger committed
3
# Under LGPL Licence, please you must read the LICENCE file.
BRAMAS Berenger's avatar
BRAMAS Berenger committed
4 5 6 7 8 9 10 11 12 13 14
###########################################################################
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}
)

BRAMAS Berenger's avatar
BRAMAS Berenger committed
15
INSTALL(DIRECTORY ./ DESTINATION include/ )
BRAMAS Berenger's avatar
BRAMAS Berenger committed
16 17 18 19 20 21 22

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


# Searching all cpp file
BRAMAS Berenger's avatar
BRAMAS Berenger committed
23
file(GLOB_RECURSE source_lib_files ./*.cpp)
BRAMAS Berenger's avatar
BRAMAS Berenger committed
24 25 26 27 28 29 30

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

BRAMAS Berenger's avatar
BRAMAS Berenger committed
31 32 33 34 35 36
if(SPETABARU_DO_INSTALL)
    target_include_directories(spetabaru INTERFACE $<INSTALL_INTERFACE:include>)
    INSTALL(TARGETS spetabaru EXPORT spetabaru DESTINATION lib )
    INSTALL(EXPORT spetabaru DESTINATION lib )
endif()