muparser.cmake 1.19 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
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 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
target_include_directories(muparser PUBLIC ${MUPARSER_INCLUDE_DIR})

if (ENABLE_CXX11)
  set_property(TARGET muparser PROPERTY CXX_STANDARD 11)
  set_property(TARGET muparser PROPERTY CXX_STANDARD_REQUIRED ON)
  target_compile_definitions(muparser PRIVATE HAS_CXX11=1)
endif (ENABLE_CXX11)

# 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
	DESTINATION lib/amdis/ )