muparser.cmake 1.17 KB
Newer Older
1 2 3 4
# specify the target and requirements for the muparser library

set(MUPARSER_SOURCE_DIR ${BASE_DIR}/lib/muparser_v134/src)
set(MUPARSER_INCLUDE_DIR ${BASE_DIR}/lib/muparser_v134/include)
5
add_library(muparser STATIC
6 7 8 9 10 11 12 13 14 15
    ${MUPARSER_SOURCE_DIR}/muParser.cpp
    ${MUPARSER_SOURCE_DIR}/muParserBase.cpp
    ${MUPARSER_SOURCE_DIR}/muParserBytecode.cpp
    ${MUPARSER_SOURCE_DIR}/muParserCallback.cpp
    ${MUPARSER_SOURCE_DIR}/muParserComplex.cpp
    ${MUPARSER_SOURCE_DIR}/muParserDLL.cpp
    ${MUPARSER_SOURCE_DIR}/muParserError.cpp
    ${MUPARSER_SOURCE_DIR}/muParserInt.cpp
    ${MUPARSER_SOURCE_DIR}/muParserTest.cpp
    ${MUPARSER_SOURCE_DIR}/muParserTokenReader.cpp)
16

17
target_include_directories(muparser PUBLIC ${MUPARSER_INCLUDE_DIR})
18
set_property(TARGET muparser PROPERTY POSITION_INDEPENDENT_CODE ON)
19

20 21
target_enable_cxx11(MUPARSER_ENABLE_CXX11 muparser PRIVATE)
target_compile_definitions(muparser PRIVATE AMDIS_HAS_CXX11=1)
22 23 24 25 26 27 28 29

# specify how to install this target:
# -----------------------------------

file(GLOB MUPARSER_HEADERS "${MUPARSER_SOURCE_DIR}/include/*.h")
install(FILES ${MUPARSER_HEADERS}
	DESTINATION include/amdis/muparser)
install(TARGETS muparser
30
	DESTINATION lib/amdis/ )