Skip to content

Commit

Permalink
Initial work to fix cygwin builds
Browse files Browse the repository at this point in the history
  • Loading branch information
xor-gate committed Oct 22, 2016
1 parent cde9cb1 commit 68b0f3b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.7)
project(stlink C)
set(PROJECT_DESCRIPTION "Open source version of the STMicroelectronics Stlink Tools")

include(CheckIncludeFile)
option(STLINK_GENERATE_MANPAGES "Generate manpages with pandoc" OFF)

if (POLICY CMP0042)
# Newer cmake on MacOS should use @rpath
Expand All @@ -22,6 +22,7 @@ if (NOT APPLE AND NOT WIN32)
pkg_check_modules(gtk gtk+-3.0)
endif ()

include(CheckIncludeFile)
CHECK_INCLUDE_FILE(sys/mman.h STLINK_HAVE_SYS_MMAN_H)
if (STLINK_HAVE_SYS_MMAN_H)
add_definitions(-DSTLINK_HAVE_SYS_MMAN_H)
Expand Down Expand Up @@ -95,7 +96,7 @@ else()
endif()

install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION lib/${CMAKE_LIBRARY_PATH}
DESTINATION lib/${CMAKE_LIBRARY_PATH}
)

###
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
MAKEFLAGS += -s

all: release
ci: lint debug release test
ci: debug release test

help:
@echo " release: Run a release build"
Expand Down
2 changes: 0 additions & 2 deletions cmake/modules/FindLibUSB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ else ()
)
endif()

message(STATUS "LIBUSB_INCLUDE_DIR: ${LIBUSB_INCLUDE_DIR}")

if (APPLE)
set(LIBUSB_NAME libusb-1.0.a)
elseif(MSYS OR MINGW)
Expand Down
4 changes: 3 additions & 1 deletion doc/man/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set(MANPAGES
)

# Only generate manpages with pandoc in Debug builds
if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
if(${STLINK_GENERATE_MANPAGES})
include(pandocology)

foreach(manpage ${MANPAGES})
Expand All @@ -16,6 +16,8 @@ if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
PRODUCT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
endforeach()
else()
message(STATUS "Manpage generation disabled")
endif()

# Install from output folder or this folder
Expand Down

0 comments on commit 68b0f3b

Please sign in to comment.