]> granicus.if.org Git - graphviz/commitdiff
Move check for getopt.h to config-checks.cmake
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Mon, 28 Sep 2020 19:38:28 +0000 (21:38 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Thu, 8 Oct 2020 19:10:23 +0000 (21:10 +0200)
CMakeLists.txt
cmake/config_checks.cmake
config-cmake.h.in

index 49476553ac8c3007df5a5368830fb1c48077a0ea..4e1168ea77467383e903613b7267091ba026c166 100644 (file)
@@ -153,11 +153,6 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/builddate.h "#define BUILDDATE \"${GRAPHV
 
 message(STATUS "Graphviz version: ${GRAPHVIZ_VERSION_FULL}")
 
-# =================== Generate config.h with proper defines ====================
-# This check for getopt is used later in the build, so it is done here.
-include(CheckIncludeFile)
-check_include_file(getopt.h HAVE_GETOPT_H)
-
 include(config_checks)
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 
index aa241caa60710fb594cf6a914d68685c30893bac..ca8a7dd8759407c85c48a9b3295d823e724cb1b2 100644 (file)
@@ -18,6 +18,7 @@ check_include_file( unistd.h            HAVE_UNISTD_H           )
 check_include_file( vfork.h             HAVE_VFORK_H            )
 check_include_file( X11/Intrinsic.h     HAVE_X11_INTRINSIC_H    )
 check_include_file( X11/Xaw/Text.h      HAVE_X11_XAW_TEXT_H     )
+check_include_file( getopt.h            HAVE_GETOPT_H           )
 
 # Function checks
 include(CheckFunctionExists)
index ff98abbc3ee0a01a73a703ded5c6bfe9e3d6c914..831d9364f53a48ddc38d0cc7a59e324d6af00e9f 100644 (file)
@@ -17,6 +17,7 @@
 #cmakedefine HAVE_VFORK_H
 #cmakedefine HAVE_X11_INTRINSIC_H
 #cmakedefine HAVE_X11_XAW_TEXT_H
+#cmakedefine HAVE_GETOPT_H
 
 // Functions
 #cmakedefine HAVE_DRAND48