Skip to content

Commit

Permalink
Disable static library installation by default (#702)
Browse files Browse the repository at this point in the history
* Disable static library installation by default
* Added parameter for not install static lib
* Rename and move to top parameter for install static libs.
  • Loading branch information
Vascom authored and xor-gate committed Apr 17, 2018
1 parent 8893533 commit b1b2a2f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ project(stlink C)
set(PROJECT_DESCRIPTION "Open source version of the STMicroelectronics Stlink Tools")
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")
set(STLINK_STATIC_LIB ON CACHE BOOL "Install static lib")

if( IS_DIRECTORY ${LIB_INSTALL_DIR})
set(LIB_INSTALL_DIR ${LIB_INSTALL_DIR} CACHE PATH "Main library directory")
Expand Down Expand Up @@ -167,9 +168,11 @@ endif()

set_target_properties(${STLINK_LIB_STATIC} PROPERTIES OUTPUT_NAME ${PROJECT_NAME})

install(TARGETS ${STLINK_LIB_STATIC}
ARCHIVE DESTINATION ${STLINK_LIBRARY_PATH}
)
if (STLINK_STATIC_LIB)
install(TARGETS ${STLINK_LIB_STATIC}
ARCHIVE DESTINATION ${STLINK_LIBRARY_PATH}
)
endif()

###
# Tools
Expand Down

0 comments on commit b1b2a2f

Please sign in to comment.