--- /dev/null
+include(FindPackageHandleStandardArgs)
+
+find_path(GETOPT_INCLUDE_DIR getopt.h)
+find_library(GETOPT_LIBRARY NAMES getopt)
+find_program(GETOPT_RUNTIME_LIBRARY NAMES getopt.dll)
+
+if(WIN32)
+ find_package_handle_standard_args(GETOPT DEFAULT_MSG
+ GETOPT_INCLUDE_DIR
+ GETOPT_LIBRARY
+ GETOPT_RUNTIME_LIBRARY
+ )
+else()
+ find_package_handle_standard_args(GETOPT DEFAULT_MSG
+ GETOPT_INCLUDE_DIR
+ GETOPT_LIBRARY
+ )
+endif()
+
+set(GETOPT_INCLUDE_DIRS ${GETOPT_INCLUDE_DIR})
+set(GETOPT_LIBRARIES ${GETOPT_LIBRARY})
+set(GETOPT_LINK_LIBRARIES ${GETOPT_LIBRARY})
+set(GETOPT_RUNTIME_LIBRARIES ${GETOPT_RUNTIME_LIBRARY})
+++ /dev/null
-include(FindPackageHandleStandardArgs)
-
-find_path(Getopt_INCLUDE_DIR getopt.h)
-find_library(Getopt_LIBRARY NAMES getopt)
-find_program(Getopt_RUNTIME_LIBRARY NAMES getopt.dll)
-
-if(WIN32)
- find_package_handle_standard_args(Getopt DEFAULT_MSG
- Getopt_INCLUDE_DIR
- Getopt_LIBRARY
- Getopt_RUNTIME_LIBRARY
- )
-else()
- find_package_handle_standard_args(Getopt DEFAULT_MSG
- Getopt_INCLUDE_DIR
- Getopt_LIBRARY
- )
-endif()
-
-set(Getopt_INCLUDE_DIRS ${Getopt_INCLUDE_DIR})
-set(Getopt_LIBRARIES ${Getopt_LIBRARY})
-set(Getopt_LINK_LIBRARIES ${Getopt_LIBRARY})
-set(Getopt_RUNTIME_LIBRARIES ${Getopt_RUNTIME_LIBRARY})
# - installation of manpage
function(tool_defaults name)
if(NOT HAVE_GETOPT_H)
- target_link_libraries(${name} ${Getopt_LINK_LIBRARIES})
+ target_link_libraries(${name} ${GETOPT_LINK_LIBRARIES})
endif()
install(
${GRAPHVIZ_LIB_DIR}/gvc
${GRAPHVIZ_LIB_DIR}/pack
${GRAPHVIZ_LIB_DIR}/pathplan
- ${Getopt_INCLUDE_DIRS}
+ ${GETOPT_INCLUDE_DIRS}
)
target_link_libraries(${name}
${GRAPHVIZ_LIB_DIR}/gvc
${GRAPHVIZ_LIB_DIR}/pack
${GRAPHVIZ_LIB_DIR}/pathplan
- ${Getopt_INCLUDE_DIRS}
+ ${GETOPT_INCLUDE_DIRS}
)
target_link_libraries(dijkstra
${GRAPHVIZ_LIB_DIR}/gvc
${GRAPHVIZ_LIB_DIR}/pack
${GRAPHVIZ_LIB_DIR}/pathplan
- ${Getopt_INCLUDE_DIRS}
+ ${GETOPT_INCLUDE_DIRS}
)
target_link_libraries(gml2gv
${GRAPHVIZ_LIB_DIR}/common
${GRAPHVIZ_LIB_DIR}/gvc
${GRAPHVIZ_LIB_DIR}/pathplan
- ${Getopt_INCLUDE_DIRS})
+ ${GETOPT_INCLUDE_DIRS})
target_link_libraries(gv2gml cgraph gvc ingraphs)
if(NOT HAVE_GETOPT_H)
- target_link_libraries(gv2gml ${Getopt_LINK_LIBRARIES})
+ target_link_libraries(gv2gml ${GETOPT_LINK_LIBRARIES})
endif()
install(TARGETS gv2gml RUNTIME DESTINATION ${BINARY_INSTALL_DIR})
${GRAPHVIZ_LIB_DIR}/pack
${GRAPHVIZ_LIB_DIR}/pathplan
${EXPAT_INCLUDE_DIRS}
- ${Getopt_INCLUDE_DIRS}
+ ${GETOPT_INCLUDE_DIRS}
)
target_link_libraries(graphml2gv
${GRAPHVIZ_LIB_DIR}/gvc
${GRAPHVIZ_LIB_DIR}/pack
${GRAPHVIZ_LIB_DIR}/pathplan
- ${Getopt_INCLUDE_DIRS}
+ ${GETOPT_INCLUDE_DIRS}
)
target_link_libraries(gvcolor
${GRAPHVIZ_LIB_DIR}/gvc
${GRAPHVIZ_LIB_DIR}/pack
${GRAPHVIZ_LIB_DIR}/pathplan
- ${Getopt_INCLUDE_DIRS}
+ ${GETOPT_INCLUDE_DIRS}
)
target_link_libraries(gvgen cgraph)
${GRAPHVIZ_LIB_DIR}/gvc
${GRAPHVIZ_LIB_DIR}/pack
${GRAPHVIZ_LIB_DIR}/pathplan
- ${Getopt_INCLUDE_DIRS}
+ ${GETOPT_INCLUDE_DIRS}
)
target_link_libraries(gvpack
${GRAPHVIZ_LIB_DIR}/pack
${GRAPHVIZ_LIB_DIR}/pathplan
${EXPAT_INCLUDE_DIRS}
- ${Getopt_INCLUDE_DIRS}
+ ${GETOPT_INCLUDE_DIRS}
)
target_link_libraries(gxl2gv
${GRAPHVIZ_LIB_DIR}/gvc
${GRAPHVIZ_LIB_DIR}/pack
${GRAPHVIZ_LIB_DIR}/pathplan
- ${Getopt_INCLUDE_DIRS}
+ ${GETOPT_INCLUDE_DIRS}
)
target_link_libraries(mm2gv
${GRAPHVIZ_LIB_DIR}/gvc
${GRAPHVIZ_LIB_DIR}/pack
${GRAPHVIZ_LIB_DIR}/pathplan
- ${Getopt_INCLUDE_DIRS}
+ ${GETOPT_INCLUDE_DIRS}
)
target_link_libraries(sccmap
if(WIN32 AND install_win_dependency_dlls)
install(
- FILES ${Getopt_RUNTIME_LIBRARIES}
+ FILES ${GETOPT_RUNTIME_LIBRARIES}
DESTINATION ${BINARY_INSTALL_DIR}
)
endif()