Skip to content

Commit

Permalink
build: only include GNUInstallDirs once
Browse files Browse the repository at this point in the history
Avoid including the utility once, which should avoid some unnecessary
CMake checks, and reduces duplication.
  • Loading branch information
compnerd authored and jgm committed Jan 3, 2020
1 parent 78168bf commit b7188e8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.0)
project(cmark VERSION 0.29.0)

include("FindAsan.cmake")
include(GNUInstallDirs)

if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(FATAL_ERROR "Do not build in-source.\nPlease remove CMakeCache.txt and the CMakeFiles/ directory.\nThen: mkdir build ; cd build ; cmake .. ; make")
Expand Down
3 changes: 0 additions & 3 deletions man/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
if (NOT MSVC)

include(GNUInstallDirs)

install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man1/cmark.1
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)

Expand Down
2 changes: 0 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ if(${CMAKE_VERSION} VERSION_GREATER "3.3")
cmake_policy(SET CMP0063 NEW)
endif()

include(GNUInstallDirs)

set(LIBRARY "libcmark")
set(STATICLIBRARY "libcmark_static")
set(HEADERS
Expand Down

0 comments on commit b7188e8

Please sign in to comment.