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
belle-sip
Commits
14d648ae
Commit
14d648ae
authored
Mar 05, 2015
by
Ghislain MARY
Browse files
Remove useless checks when building with CMake.
parent
f587dfe9
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
14d648ae
...
...
@@ -41,7 +41,6 @@ option(ENABLE_TUNNEL "Enable tunnel support" OFF)
option
(
ENABLE_TESTS
"Enable compilation of tests"
ON
)
include
(
CheckIncludeFile
)
include
(
CheckLibraryExists
)
include
(
CheckSymbolExists
)
include
(
CheckCSourceCompiles
)
...
...
@@ -53,20 +52,10 @@ if(MSVC)
endif
()
list
(
APPEND CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
check_include_file
(
"dlfcn.h"
HAVE_DLFCN_H
)
check_include_file
(
"inttypes.h"
HAVE_INTTYPES_H
)
check_include_file
(
"memory.h"
HAVE_MEMORY_H
)
check_include_file
(
"stdint.h"
HAVE_STDINT_H
)
check_include_file
(
"stdlib.h"
HAVE_STDLIB_H
)
check_include_file
(
"strings.h"
HAVE_STRINGS_H
)
check_include_file
(
"string.h"
HAVE_STRING_H
)
check_include_file
(
"sys/stat.h"
HAVE_SYS_STAT_H
)
check_include_file
(
"sys/types.h"
HAVE_SYS_TYPES_H
)
check_include_file
(
"unistd.h"
HAVE_UNISTD_H
)
check_library_exists
(
"dl"
"dlopen"
""
HAVE_LIBDL
)
check_library_exists
(
"rt"
"clock_gettime"
""
HAVE_LIBRT
)
cmake_push_check_state
(
RESET
)
check_symbol_exists
(
"res_ndestroy"
"resolv.h"
HAVE_RES_NDESTROY
)
set
(
CMAKE_REQUIRED_LIBRARIES resolv
)
check_c_source_compiles
(
"#include <resolv.h>
...
...
@@ -75,9 +64,10 @@ res_getservers(NULL,NULL,0);
return 0;
}"
HAVE_RES_GETSERVERS
)
if
(
NOT
"
${
HAVE_RES_NDESTROY
}
"
STREQUAL
""
AND NOT
"
${
HAVE_RES_GETSERVERS
}
"
STREQUAL
""
)
if
(
HAVE_RES_NDESTROY
AND
HAVE_RES_GETSERVERS
)
set
(
HAVE_RESINIT 1
)
endif
()
cmake_pop_check_state
()
find_package
(
Threads
)
...
...
config.h.cmake
View file @
14d648ae
...
...
@@ -29,37 +29,6 @@
#cmakedefine PACKAGE_URL "@PACKAGE_URL@"
#cmakedefine VERSION "@VERSION@"
#ifndef HAVE_DLFCN_H
#cmakedefine HAVE_DLFCN_H
#endif
#ifndef HAVE_INTTYPES_H
#cmakedefine HAVE_INTTYPES_H
#endif
#ifndef HAVE_MEMORY_H
#cmakedefine HAVE_MEMORY_H
#endif
#ifndef HAVE_STDINT_H
#cmakedefine HAVE_STDINT_H
#endif
#ifndef HAVE_STDLIB_H
#cmakedefine HAVE_STDLIB_H
#endif
#ifndef HAVE_STRINGS_H
#cmakedefine HAVE_STRINGS_H
#endif
#ifndef HAVE_STRING_H
#cmakedefine HAVE_STRING_H
#endif
#ifndef HAVE_SYS_STAT_H
#cmakedefine HAVE_SYS_STAT_H
#endif
#ifndef HAVE_SYS_TYPES_H
#cmakedefine HAVE_SYS_TYPES_H
#endif
#ifndef HAVE_UNISTD_H
#cmakedefine HAVE_UNISTD_H
#endif
#cmakedefine HAVE_LIBDL
#cmakedefine HAVE_LIBRT
...
...
src/CMakeLists.txt
View file @
14d648ae
...
...
@@ -23,18 +23,18 @@
set
(
INCLUDES
${
ANTLR3C_INCLUDE_DIRS
}
)
set
(
LIBS
${
ANTLR3C_LIBRARIES
}
)
if
(
${
Threads_FOUND
}
)
if
(
Threads_FOUND
)
if
(
CMAKE_USE_PTHREADS_INIT AND NOT CMAKE_SYSTEM_NAME MATCHES
"QNX"
)
list
(
APPEND LIBS pthread
)
endif
()
endif
()
if
(
${
HAVE_LIBDL
}
)
if
(
HAVE_LIBDL
)
list
(
APPEND LIBS dl
)
endif
()
if
(
${
HAVE_LIBRT
}
)
if
(
HAVE_LIBRT
)
list
(
APPEND LIBS rt
)
endif
()
if
(
${
HAVE_RESINIT
}
)
if
(
HAVE_RESINIT
)
list
(
APPEND LIBS resolv
)
endif
()
if
(
WIN32
)
...
...
@@ -67,7 +67,7 @@ add_custom_command(
set_source_files_properties
(
${
GRAMMARS_SOURCE_FILES
}
${
SIP_MESSAGE_GENERATED_SOURCE_FILES
}
PROPERTIES GENERATED TRUE
)
if
(
${
ENABLE_TLS
}
)
if
(
ENABLE_TLS
)
set
(
TLS_SOURCE_FILES
transports/tls_listeningpoint_polarssl.c
transports/tls_channel_polarssl.c
...
...
@@ -76,7 +76,7 @@ if(${ENABLE_TLS})
list
(
APPEND LIBS
${
POLARSSL_LIBRARIES
}
)
endif
()
if
(
${
ENABLE_TUNNEL
}
)
if
(
ENABLE_TUNNEL
)
set
(
TUNNEL_SOURCE_FILES
transports/tunnel_listeningpoint.c
transports/tunnel_channel.c
...
...
@@ -143,7 +143,7 @@ if(APPLE)
set_source_files_properties
(
backgroundtask.m PROPERTIES COMPILE_FLAGS
"-fmodules"
)
endif
()
if
(
${
ENABLE_STATIC
}
)
if
(
ENABLE_STATIC
)
add_library
(
bellesip STATIC
${
SOURCE_FILES
}
)
else
()
add_library
(
bellesip SHARED
${
SOURCE_FILES
}
)
...
...
@@ -158,11 +158,7 @@ else()
endif
()
endif
()
set_target_properties
(
bellesip PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS
"
${
LINK_FLAGS
}
"
)
if
(
"
${
CMAKE_VERSION
}
"
VERSION_GREATER
"2.8.10"
)
target_include_directories
(
bellesip PUBLIC
${
INCLUDES
}
)
else
()
include_directories
(
${
INCLUDES
}
)
endif
()
target_include_directories
(
bellesip PUBLIC
${
INCLUDES
}
)
target_link_libraries
(
bellesip
${
LIBS
}
)
install
(
TARGETS bellesip EXPORT BelleSIPTargets
...
...
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