root_CMakeLists.txt 1.57 KB
Newer Older
1
2
PROJECT(vlc)

3
4
ENABLE_TESTING()

5
6
7
# Set the module path
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)

8
# Our own include
9
include( vlc_module_funcs )
10

11
12
# Our config
include( config )
13

14
# Global definitions
15
16
add_definitions(-DHAVE_CONFIG_H)
add_definitions(-D__LIBVLC__)
17
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
18
set(CMAKE_INCLUDE_CURRENT_DIR ON)
19

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
20
21
# Needed for glibc:
add_definitions(-D_GNU_SOURCE)
22

23
# Our main include directories
24
include_directories(${CMAKE_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/include)
25

26
# our sources:
27
28
add_subdirectory(src)
add_subdirectory(modules)
29
add_subdirectory(po)
30

31
32
33
34
35
36
37
38
39
# Enable uninstall
configure_file(
  "${CMAKE_CURRENT_SOURCE_DIR}/extras/buildsystem/cmake/cmake_uninstall.cmake.in"
  "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
  IMMEDIATE @ONLY)

add_custom_target(uninstall
  "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")

40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Enable CPack: Automatic package creation

set(README "${CMAKE_CURRENT_SOURCE_DIR}/README")
set(LICENCE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")

if(APPLE)
set(README "${CMAKE_CURRENT_SOURCE_DIR}/extras/package/macosx/README.MacOSX.rtf")
set(LICENCE "") # FIXME: Mac OS X's Package Maker doesn't allow non .*
endif(APPLE)

set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "VLC Media Player")
set(CPACK_PACKAGE_VENDOR "VideoLAN Team")
set(CPACK_PACKAGE_DESCRIPTION_FILE ${README})
set(CPACK_RESOURCE_FILE_LICENSE ${LICENCE})
set(CPACK_PACKAGE_VERSION_MAJOR "${VLC_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${VLC_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${VLC_VERSION_PATCH}${VLC_VERSION_EXTRA}")

include(CPack)