Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
WCCL
Commits
5645e954
Commit
5645e954
authored
14 years ago
by
ilor
Browse files
Options
Downloads
Patches
Plain Diff
add the missing FindLibedit cmake script
parent
e314eff8
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeScripts/FindLibedit.cmake
+90
-0
90 additions, 0 deletions
CMakeScripts/FindLibedit.cmake
with
90 additions
and
0 deletions
CMakeScripts/FindLibedit.cmake
0 → 100644
+
90
−
0
View file @
5645e954
# - Try to find libedit
# Once done this will define
#
# Libedit_FOUND - system has libedit
# Libedit_INCLUDE_DIRS - the libedit include directory
# Libedit_LIBRARIES - Link these to use libedit
# Libedit_DEFINITIONS - Compiler switches required for using libedit
#
# Copyright (c) 2008 Andreas Schneider <mail@cynapses.org>
# Modified for other libraries by Lasse Kärkkäinen <tronic>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
if
(
Libedit_LIBRARIES AND Libedit_INCLUDE_DIRS
)
# in cache already
set
(
Libedit_FOUND TRUE
)
else
(
Libedit_LIBRARIES AND Libedit_INCLUDE_DIRS
)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
if
(
${
CMAKE_MAJOR_VERSION
}
EQUAL 2 AND
${
CMAKE_MINOR_VERSION
}
EQUAL 4
)
include
(
UsePkgConfig
)
pkgconfig
(
libedit _Libedit_INCLUDEDIR _Libedit_LIBDIR _Libedit_LDFLAGS _Libedit_CFLAGS
)
else
(
${
CMAKE_MAJOR_VERSION
}
EQUAL 2 AND
${
CMAKE_MINOR_VERSION
}
EQUAL 4
)
find_package
(
PkgConfig
)
if
(
PKG_CONFIG_FOUND
)
pkg_check_modules
(
_LIBEDIT libedit
)
endif
(
PKG_CONFIG_FOUND
)
endif
(
${
CMAKE_MAJOR_VERSION
}
EQUAL 2 AND
${
CMAKE_MINOR_VERSION
}
EQUAL 4
)
find_path
(
Libedit_INCLUDE_DIR
NAMES
histedit.h
PATHS
${
_Libedit_INCLUDEDIR
}
/usr/include
/usr/local/include
/opt/local/include
/sw/include
PATH_SUFFIXES
editline
)
find_library
(
Libedit_LIBRARY
NAMES
edit
PATHS
${
_Libedit_LIBDIR
}
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
)
if
(
Libedit_LIBRARY
)
set
(
Libedit_FOUND TRUE
)
endif
(
Libedit_LIBRARY
)
set
(
Libedit_INCLUDE_DIRS
${
Libedit_INCLUDE_DIR
}
)
if
(
Libedit_FOUND
)
set
(
Libedit_LIBRARIES
${
Libedit_LIBRARIES
}
${
Libedit_LIBRARY
}
)
endif
(
Libedit_FOUND
)
if
(
Libedit_INCLUDE_DIRS AND Libedit_LIBRARIES
)
set
(
Libedit_FOUND TRUE
)
endif
(
Libedit_INCLUDE_DIRS AND Libedit_LIBRARIES
)
if
(
Libedit_FOUND
)
if
(
NOT Libedit_FIND_QUIETLY
)
message
(
STATUS
"Found libedit:
${
Libedit_LIBRARY
}
"
)
endif
(
NOT Libedit_FIND_QUIETLY
)
else
(
Libedit_FOUND
)
if
(
Libedit_FIND_REQUIRED
)
message
(
FATAL_ERROR
"Could not find libedit"
)
endif
(
Libedit_FIND_REQUIRED
)
endif
(
Libedit_FOUND
)
# show the Libedit_INCLUDE_DIRS and Libedit_LIBRARIES variables only in the advanced view
mark_as_advanced
(
Libedit_INCLUDE_DIRS Libedit_LIBRARIES
)
endif
(
Libedit_LIBRARIES AND Libedit_INCLUDE_DIRS
)
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment