forked from stream-labs/obs-studio-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
61 lines (48 loc) · 1.52 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
IF(CLANG_ANALYZE_CONFIG)
set(CMAKE_C_COMPILER_WORKS 1)
set(CMAKE_CXX_COMPILER_WORKS 1)
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xclang -fexceptions -Xclang -fcxx-exceptions")
ENDIF()
set(VERSION_FULL 0.3.21)
set(VERSION_BUILD 0)
find_package(Git)
if(EXISTS "${CMAKE_SOURCE_DIR}/.git" AND Git_FOUND)
execute_process(
COMMAND "${GIT_EXECUTABLE}" rev-list --count --topo-order v${VERSION_FULL}..HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
endif()
project(obs-studio-node VERSION ${VERSION_FULL}.${VERSION_BUILD})
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
# CppCheck
IF( NOT CLANG_ANALYZE_CONFIG)
include(cppcheck)
cppcheck(EXCLUDE "${PROJECT_SOURCE_DIR}/node_modules")
ENDIF()
if(WIN32)
# Resource VersionInfo
set(PROJECT_PRODUCT_NAME "OBS Studio for Node.JS")
set(PROJECT_COMPANY_NAME "Streamlabs")
set(PROJECT_COPYRIGHT "Streamlabs © 2017 - 2018")
set(PROJECT_LEGAL_TRADEMARKS_1 "")
set(PROJECT_LEGAL_TRADEMARKS_2 "")
configure_file(
${PROJECT_SOURCE_DIR}/cmake/version.rc.in
${PROJECT_BINARY_DIR}/version.rc
@ONLY
)
# ToDo: Figure out a better way to tell the test setup where to find our binaries.
configure_file(
${PROJECT_SOURCE_DIR}/cmake/obs.js.in
${PROJECT_SOURCE_DIR}/tests/helpers/obs.js
@ONLY
)
endif()
add_subdirectory(lib-streamlabs-ipc)
add_subdirectory(obs-studio-client)
add_subdirectory(obs-studio-server)
include(CPack)