forked from videolan/vlc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: Add a FindDlopen module. (Ask for review by dlopen users).
- Loading branch information
1 parent
6404591
commit 2c86b23
Showing
4 changed files
with
57 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,28 @@ | ||
PROJECT(vlc) | ||
|
||
# Set the module path | ||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) | ||
|
||
# Our own include | ||
include( ${CMAKE_SOURCE_DIR}/cmake/vlc_module_funcs.cmake ) | ||
include( vlc_module_funcs ) | ||
|
||
# Config | ||
include( ${CMAKE_SOURCE_DIR}/cmake/config.cmake ) | ||
# Our config | ||
include( config ) | ||
|
||
add_definitions(-DHAVE_CONFIG_H) | ||
add_definitions(-D__LIBVLC__) | ||
add_definitions(-I. -std=gnu99) | ||
|
||
# Needed for glibc: | ||
add_definitions(-D_GNU_SOURCE) | ||
|
||
# Our main include directories | ||
include_directories(${CMAKE_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/include) | ||
|
||
# Sources | ||
# our sources: | ||
add_subdirectory(src) | ||
add_subdirectory(modules) | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# From licq www.licq.org (GPL) | ||
# - Find library containing dlopen() | ||
# The following variables are set if dlopen is found. If dlopen is not | ||
# found, Dlopen_FOUND is set to false. | ||
# Dlopen_FOUND - System has dlopen. | ||
# Dlopen_LIBRARIES - Link these to use dlopen. | ||
# | ||
# Copyright (c) 2007 Erik Johansson <[email protected]> | ||
# Redistribution and use is allowed according to the terms of the BSD license. | ||
|
||
include(CheckLibraryExists) | ||
|
||
# Assume dlopen is not found. | ||
set(Dlopen_FOUND FALSE) | ||
|
||
foreach (library c c_r dl) | ||
if (NOT Dlopen_FOUND) | ||
check_library_exists(${library} dlopen "" Dlopen_IN_${library}) | ||
|
||
if (Dlopen_IN_${library}) | ||
set(Dlopen_LIBRARIES ${library} CACHE STRING "Library containing dlopen") | ||
set(Dlopen_FOUND TRUE) | ||
endif (Dlopen_IN_${library}) | ||
|
||
endif (NOT Dlopen_FOUND) | ||
endforeach (library) | ||
|
||
if (Dlopen_FOUND) | ||
if (NOT Dlopen_FIND_QUIETLY) | ||
message(STATUS "Found dlopen in: ${Dlopen_LIBRARIES}") | ||
endif (NOT Dlopen_FIND_QUIETLY) | ||
else (Dlopen_FOUND) | ||
if (Dlopen_FIND_REQUIRED) | ||
message(FATAL_ERROR "Could not find the library containing dlopen") | ||
endif (Dlopen_FIND_REQUIRED) | ||
endif (Dlopen_FOUND) | ||
|
||
mark_as_advanced(Dlopen_LIBRARIES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters