mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-05 21:53:27 -06:00
43 lines
966 B
CMake
43 lines
966 B
CMake
cmake_minimum_required (VERSION 2.8.12)
|
|
|
|
project (expressionparser)
|
|
|
|
if(MSVC)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
|
|
message(STATUS "MSVC: Enabled increased number of sections in object files")
|
|
endif()
|
|
|
|
if (RESINSIGHT_BUILD_WITH_QT5)
|
|
find_package(Qt5 COMPONENTS Core REQUIRED)
|
|
else()
|
|
find_package(Qt4 COMPONENTS QtCore REQUIRED)
|
|
include(${QT_USE_FILE})
|
|
endif(RESINSIGHT_BUILD_WITH_QT5)
|
|
|
|
list (APPEND MAIN_SOURCE_FILES
|
|
ExpressionParser.h
|
|
ExpressionParser.cpp
|
|
ExpressionParserImpl.h
|
|
ExpressionParserImpl.cpp
|
|
)
|
|
|
|
add_library( ${PROJECT_NAME}
|
|
STATIC
|
|
${MAIN_SOURCE_FILES}
|
|
)
|
|
|
|
if(MSVC)
|
|
set_target_properties(expressionparser PROPERTIES COMPILE_FLAGS "/wd4267")
|
|
endif()
|
|
|
|
target_include_directories(${PROJECT_NAME}
|
|
PUBLIC
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
)
|
|
|
|
if (RESINSIGHT_BUILD_WITH_QT5)
|
|
target_link_libraries(${PROJECT_NAME} Qt5::Core)
|
|
endif(RESINSIGHT_BUILD_WITH_QT5)
|
|
|
|
source_group("" FILES ${PROJECT_FILES})
|