-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
CM_source.cmake
51 lines (42 loc) · 2.26 KB
/
CM_source.cmake
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
# DarkMark (C) 2019-2024 Stephane Charette <[email protected]>
# get rid of the directories and files automatically created by Introjucer since we're using our own CMake build files
FILE ( REMOVE_RECURSE Builds Source )
# build JUCE prior to enabling Wall Wextra Werror
INCLUDE_DIRECTORIES ( BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/JuceLibraryCode )
INCLUDE_DIRECTORIES ( BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/JuceLibraryCode/modules )
ADD_SUBDIRECTORY ( src-juce )
# Would love to also have -Wshadow, but JUCE prevents me from using it.
IF (WIN32)
ADD_COMPILE_OPTIONS ( /W4 ) # warning level (high)
ADD_COMPILE_OPTIONS ( /WX ) # treat warnings as errors
ADD_COMPILE_OPTIONS ( /permissive- ) # stick to C++ standards (turn off Microsoft-specific extensions)
ADD_COMPILE_OPTIONS ( /wd4100 ) # disable "unreferenced formal parameter"
ADD_COMPILE_OPTIONS ( /wd4244 ) # disable conversion from double - possible loss of data
ADD_COMPILE_OPTIONS ( /wd4267 ) # disable conversion from size_t to int - possible loss of data
ADD_COMPILE_OPTIONS ( /wd4458 ) # disable hide class member warning
ADD_COMPILE_OPTIONS ( /wd4251 ) # disable POTENTIALLY IMPORTANT warning about poppler-page.h
ADD_COMPILE_OPTIONS ( /wd4127 ) # disable unknown warning conditional expression is constant for types.hpp - debug fix
ADD_LINK_OPTIONS ( /ENTRY:WinMainCRTStartup ) # Attempt to fix "__scrt_common_main_seh(void)" linker juice error
ADD_COMPILE_DEFINITIONS ( _CRT_SECURE_NO_WARNINGS ) # don't complain about localtime()
SET ( CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
ELSE ()
ADD_DEFINITIONS ( "-Wall -Wextra -Werror -Wno-unused-parameter") # -Wshadow" )
ENDIF ()
INCLUDE_DIRECTORIES ( BEFORE src-main )
INCLUDE_DIRECTORIES ( BEFORE src-tools )
INCLUDE_DIRECTORIES ( BEFORE src-wnd )
INCLUDE_DIRECTORIES ( BEFORE src-classid )
INCLUDE_DIRECTORIES ( BEFORE src-launcher )
INCLUDE_DIRECTORIES ( BEFORE src-darkmark )
INCLUDE_DIRECTORIES ( BEFORE src-darknet )
ADD_SUBDIRECTORY ( src-tools )
ADD_SUBDIRECTORY ( src-darknet )
ADD_SUBDIRECTORY ( src-darkmark )
ADD_SUBDIRECTORY ( src-classid )
ADD_SUBDIRECTORY ( src-launcher )
ADD_SUBDIRECTORY ( src-wnd )
ADD_SUBDIRECTORY ( src-main )
ADD_SUBDIRECTORY ( src-dox )
IF (UNIX)
ADD_SUBDIRECTORY ( src-ubuntu )
ENDIF ()