Skip to content

Commit

Permalink
fix incorrect VAR usage in condition
Browse files Browse the repository at this point in the history
  • Loading branch information
slyshykO committed Mar 30, 2018
1 parent eaa83e9 commit 102f421
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ set(PROJECT_DESCRIPTION "Open source version of the STMicroelectronics Stlink To
set(STLINK_UDEV_RULES_DIR "/etc/udev/rules.d" CACHE PATH "Udev rules directory")
set(STLINK_MODPROBED_DIR "/etc/modprobe.d" CACHE PATH "modprobe.d directory")

if( IS_DIRECTORY LIB_INSTALL_DIR)
if( IS_DIRECTORY ${LIB_INSTALL_DIR})
set(LIB_INSTALL_DIR ${LIB_INSTALL_DIR} CACHE PATH "Main library directory")
set(STLINK_LIBRARY_PATH "${LIB_INSTALL_DIR}" CACHE PATH "Target lib directory")
set(STLINK_LIBRARY_PATH "${LIB_INSTALL_DIR}")
else()
set(LIB_INSTALL_DIR "lib" CACHE PATH "Main library directory")
set(STLINK_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}" CACHE PATH "Target lib directory")
set(STLINK_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}" )
endif()

if( IS_DIRECTORY INCLUDE_INSTALL_DIR)
if( IS_DIRECTORY ${INCLUDE_INSTALL_DIR})
set(INCLUDE_INSTALL_DIR ${INCLUDE_INSTALL_DIR} CACHE PATH "Main include directory")
set(STLINK_INCLUDE_PATH "${INCLUDE_INSTALL_DIR}" CACHE PATH "Target include directory")
set(STLINK_INCLUDE_PATH "${INCLUDE_INSTALL_DIR}" )
else()
set(INCLUDE_INSTALL_DIR "include" CACHE PATH "Main include directory")
set(STLINK_INCLUDE_PATH "${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR}" CACHE PATH "Target include directory")
set(STLINK_INCLUDE_PATH "${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR}")
endif()

option(STLINK_GENERATE_MANPAGES "Generate manpages with pandoc" OFF)
Expand Down

0 comments on commit 102f421

Please sign in to comment.