diff --git a/CMakeFiles/MuParser.cmake b/CMakeFiles/MuParser.cmake deleted file mode 100644 index 525181f6f..000000000 --- a/CMakeFiles/MuParser.cmake +++ /dev/null @@ -1,28 +0,0 @@ -INCLUDE(ExternalProject) - -SET(MUPARSER_PREFIX muparser-build) -SET(MUPARSER_SRC ${CMAKE_CURRENT_SOURCE_DIR}/muparser-2.2.5) -SET(MUPARSER_OBJ ${MUPARSER_PREFIX}/obj) -SET(MUPARSER_DST ${MUPARSER_PREFIX}/dst) - -# MuParser configure has an obnoxious victory message which we suppress. -EXTERNALPROJECT_ADD( - muparser_project - PREFIX ${MUPARSER_PREFIX} - SOURCE_DIR ${MUPARSER_SRC} - BINARY_DIR ${MUPARSER_OBJ} - INSTALL_DIR ${MUPARSER_DST} - CONFIGURE_COMMAND ${MUPARSER_SRC}/configure - --prefix=${CMAKE_CURRENT_BINARY_DIR}/${MUPARSER_DST} - --quiet --enable-shared=no --enable-samples=no --enable-debug=no > /dev/null - BUILD_COMMAND make -j 3 CPPFLAGS=-D_UNICODE=1\ -Wno-switch lib/libmuparser.a - INSTALL_COMMAND make install - BUILD_BYPRODUCTS ${MUPARSER_DST}/lib/libmuparser.a - EXCLUDE_FROM_ALL -) - -ADD_LIBRARY(muparser STATIC IMPORTED) -SET_TARGET_PROPERTIES(muparser PROPERTIES IMPORTED_LOCATION - ${CMAKE_CURRENT_BINARY_DIR}/${MUPARSER_DST}/lib/libmuparser.a) -ADD_DEPENDENCIES(muparser muparser_project) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/${MUPARSER_DST}/include/) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9501887bb..2165445c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,7 +76,7 @@ ADD_DEFINITIONS(-D_UNICODE=1 INCLUDE(CMakeFiles/PCRE2.cmake) # Set up muparser. -INCLUDE(CMakeFiles/MuParser.cmake) +INCLUDE(muparser-2.2.5/CMakeLists.txt) # Set up the docs. INCLUDE(CMakeFiles/Docs.cmake) @@ -93,9 +93,6 @@ TARGET_LINK_LIBRARIES(fishlib ${CURSES_LIBRARY} ${CURSES_EXTRA_LIBRARY} Threads::Threads ${CMAKE_DL_LIBS} ${PCRE2_LIB} muparser) -# builtin_math.cpp needs to see muParser's built header. -ADD_DEPENDENCIES(fishlib muparser) - # Define fish. ADD_EXECUTABLE(fish src/fish.cpp) FISH_LINK_DEPS(fish) diff --git a/muparser-2.2.5/CMakeLists.txt b/muparser-2.2.5/CMakeLists.txt new file mode 100644 index 000000000..ffb092541 --- /dev/null +++ b/muparser-2.2.5/CMakeLists.txt @@ -0,0 +1,12 @@ +SET(MUPARSER_SRCS + ${CMAKE_CURRENT_LIST_DIR}/src/muParser.cpp + ${CMAKE_CURRENT_LIST_DIR}/src/muParserBase.cpp + ${CMAKE_CURRENT_LIST_DIR}/src/muParserBytecode.cpp + ${CMAKE_CURRENT_LIST_DIR}/src/muParserCallback.cpp + ${CMAKE_CURRENT_LIST_DIR}/src/muParserDLL.cpp + ${CMAKE_CURRENT_LIST_DIR}/src/muParserError.cpp + ${CMAKE_CURRENT_LIST_DIR}/src/muParserInt.cpp + ${CMAKE_CURRENT_LIST_DIR}/src/muParserTokenReader.cpp) + +ADD_LIBRARY(muparser STATIC ${MUPARSER_SRCS}) +TARGET_INCLUDE_DIRECTORIES(muparser PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)