Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
linphone-cmake-builder
Commits
51fd618c
Commit
51fd618c
authored
Nov 06, 2014
by
Guillaume BIENKOWSKI
Browse files
Check programs an libs before attempting the compilation
parent
c9df6cdd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
configs/config-flexisip-rpm.cmake
configs/config-flexisip-rpm.cmake
+37
-0
No files found.
configs/config-flexisip-rpm.cmake
View file @
51fd618c
...
...
@@ -23,6 +23,43 @@
include
(
GNUInstallDirs
)
include
(
${
CMAKE_SOURCE_DIR
}
/cmake/FindLinuxPlatform.cmake
)
# Check if we have everything to compile correctly
FUNCTION
(
CHECK_PROGRAM progname
)
find_program
(
${
progname
}
_PROGRAM
NAMES
${
progname
}
)
if
(
NOT
${
progname
}
_PROGRAM
)
message
(
FATAL_ERROR
"Could not find the
${
progname
}
program, which is needed for RPMBuild"
)
else
()
message
(
STATUS
"Found
${
progname
}
:
${${
progname
}
_PROGRAM
}
."
)
endif
()
ENDFUNCTION
()
FUNCTION
(
CHECK_LIBRARY libname
)
find_library
(
${
libname
}
_LIBRARY
NAMES
${
libname
}
)
if
(
NOT
${
libname
}
_LIBRARY
)
message
(
FATAL_ERROR
"Could not find the
${
libname
}
library, which is needed for RPMBuild of flexisip"
)
else
()
message
(
STATUS
"Found
${
libname
}
:
${${
libname
}
_LIBRARY
}
."
)
endif
()
ENDFUNCTION
()
# Doxygen can be found through CMake
find_package
(
Doxygen REQUIRED
)
# the rest will be checked manually
FOREACH
(
PROGNAME rpmbuild alien fakeroot bison
)
CHECK_PROGRAM
(
${
PROGNAME
}
)
ENDFOREACH
()
FOREACH
(
LIBNAME hiredis ssl mysqlclient mysqlclient_r
)
CHECK_LIBRARY
(
${
LIBNAME
}
)
ENDFOREACH
()
# Define default values for the linphone builder options
set
(
DEFAULT_VALUE_ENABLE_VIDEO OFF
)
set
(
DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES OFF
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment