31 lines
978 B
CMake
31 lines
978 B
CMake
include_directories(${Qt5Widgets_INCLUDE_DIRS} ${QtQml_INCLUDE_DIRS})
|
||
add_definitions(${Qt5Widgets_DEFINITIONS} ${QtQml_DEFINITIONS} ${${Qt5Quick_DEFINITIONS}})
|
||
|
||
qt5_add_resources(QT_RESOURCES main.qrc)
|
||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
||
set(CMAKE_AUTOMOC ON)
|
||
set(CMAKE_AUTORCC ON)
|
||
set(CMAKE_AUTOUIC ON)
|
||
set(PROJECT "RPN_Calculator")
|
||
project(${PROJECT})
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++11 -fstrict-aliasing -pedantic ")
|
||
|
||
if(NOT DEFINED HEADERS)
|
||
file(GLOB HEADERS ${CMAKE_CURRENT_SOURCE_DIR}⁄*.h)
|
||
endif()
|
||
# if(NOT DEFINED SOURCES)
|
||
# file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}⁄*.cpp)
|
||
# endif()
|
||
source_group("Header Files" FILES ${HEADERS})
|
||
# source_group("Source Files" FILES ${SOURCES})
|
||
set(SOURCES main.cpp calculator.cpp)
|
||
add_executable(${PROJECT} ${HEADERS} ${SOURCES} ${QT_RESOURCES})
|
||
target_link_libraries(${PROJECT}
|
||
Qt5::Widgets
|
||
Qt5::Qml
|
||
Qt5::Quick
|
||
calc
|
||
decn
|
||
)
|