Skip to content
Snippets Groups Projects
Commit cbd840cd authored by Olivier Langella's avatar Olivier Langella
Browse files

better cmake file

parent cb3abeba
No related branches found
No related tags found
No related merge requests found
......@@ -101,8 +101,6 @@ SET(CPP_FILES
utils/utils.cpp
)
set(QTLIBS ${Qt5Xml_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Svg_LIBRARIES})
# we need this to be able to include headers produced by uic in our code
# (CMAKE_BINARY_DIR holds a path to the build directory, while INCLUDE_DIRECTORIES() works just like INCLUDEPATH from qmake)
......@@ -192,15 +190,19 @@ MESSAGE("XTPCPP_SRCS: ${XTPCPP_SRCS}")
ADD_EXECUTABLE(xtpcpp main.cpp ${CPP_FILES} ${XTPCPP_SRCS} ${GUI_UI_HDRS} ${XTPCPP_MOC_SRCS} ${xtpcpp_RCC_SRCS})
target_include_directories (xtpcpp PUBLIC ${Pwiz_INCLUDE_DIR} ${PAPPSOMSPP_INCLUDE_DIR} ${ODSSTREAM_INCLUDE_DIR} ${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTSVG_INCLUDE_DIR} ${QT_QTXML_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
target_include_directories (xtpcpp PUBLIC ${Pwiz_INCLUDE_DIR} ${PAPPSOMSPP_INCLUDE_DIR} ${ODSSTREAM_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/gui/peptide_detail_view/spectrum_widget ${CMAKE_CURRENT_SOURCE_DIR}/gui/peptide_detail_view/spectrum_widget)
target_compile_definitions(xtpcpp PUBLIC ${QT_DEFINITIONS})
SET_TARGET_PROPERTIES(xtpcpp
PROPERTIES OUTPUT_NAME xtpcpp
CLEAN_DIRECT_OUTPUT 1
COMPILE_DEFINITIONS "${QT_DEFINITIONS}"
#COMPILE_DEFINITIONS "${QT_DEFINITIONS}"
#INCLUDE_DIRECTORIES "${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR}"
)
TARGET_LINK_LIBRARIES(xtpcpp ${PAPPSOMSPP_QT4_LIBRARY} ${Pwiz_LIBRARY} ${ODSSTREAM_QT4_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTSVG_LIBRARY} ${QT_QTXML_LIBRARY})
TARGET_LINK_LIBRARIES(xtpcpp ${PAPPSOMSPP_QT4_LIBRARY} ${Pwiz_LIBRARY} ${ODSSTREAM_QT4_LIBRARY}
Qt4::QtGui Qt4::QtXml Qt4::QtSvg)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/xtpcpp DESTINATION bin)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment