Skip to content

Commit

Permalink
cmake: simplify syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
rp- committed May 12, 2015
1 parent 48b73b1 commit 274fbbb
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ set(QHEXEDIT_DIR libs/qhexedit)
set(QCUSTOMPLOT_DIR libs/qcustomplot-source)
set(QSCINTILLA_DIR libs/qscintilla/Qt4Qt5)

if(ANTLR2_FOUND)
else()
if(NOT ANTLR2_FOUND)
set(ANTLR_DIR libs/antlr-2.7.7)
add_subdirectory(${ANTLR_DIR})
endif()
Expand Down Expand Up @@ -246,8 +245,7 @@ if(USE_QT5)
set(QT_LIBRARIES "")
endif()
add_dependencies(${PROJECT_NAME} qhexedit qcustomplot qscintilla2)
if(ANTLR2_FOUND)
else()
if(NOT ANTLR2_FOUND)
add_dependencies(${PROJECT_NAME} antlr)
endif()

Expand All @@ -256,8 +254,7 @@ link_directories(
"${CMAKE_CURRENT_BINARY_DIR}/${QHEXEDIT_DIR}"
"${CMAKE_CURRENT_BINARY_DIR}/${QCUSTOMPLOT_DIR}"
"${CMAKE_CURRENT_BINARY_DIR}/${QSCINTILLA_DIR}")
if(ANTLR2_FOUND)
else()
if(NOT ANTLR2_FOUND)
link_directories("${CMAKE_CURRENT_BINARY_DIR}/${ANTLR_DIR}")
endif()

Expand Down

0 comments on commit 274fbbb

Please sign in to comment.