File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -4,18 +4,15 @@ set(CMAKE_CXX_STANDARD 17)
4
4
project (libnut )
5
5
6
6
# Source
7
- set (SOURCE_FILES "src/libnut .cc" "src/deadbeef_rand.c" "src/mouse .c" "src/keypress.c" "src/keycode .c" "src/screen .c" "src/screengrab .c" "src/MMBitmap .c" )
7
+ set (SOURCE_FILES "src/main .cc" "src/deadbeef_rand.c" "src/keycode .c" "src/keypress.c" "src/MMBitmap .c" "src/mouse .c" "src/screen .c" "src/screengrab .c" )
8
8
if (UNIX AND NOT APPLE )
9
9
set (SOURCE_FILES "${SOURCE_FILES} " "src/xdisplay.c" "src/highlightwindow_linux.c" )
10
10
elseif (UNIX AND APPLE )
11
11
set (SOURCE_FILES "${SOURCE_FILES} " "src/highlightwindow_macos.m" )
12
12
elseif (WIN32 )
13
13
set (SOURCE_FILES "${SOURCE_FILES} " "src/highlightwindow_win32.c" )
14
14
endif ()
15
- add_library (${PROJECT_NAME} SHARED ${SOURCE_FILES} )
16
-
17
- # Includes
18
- include_directories ("${CMAKE_SOURCE_DIR} /src/include" )
15
+ add_library (${PROJECT_NAME} SHARED ${SOURCE_FILES} ${CMAKE_JS_SRC} )
19
16
20
17
set (LIBS "" )
21
18
set (INCLUDES "" )
@@ -40,13 +37,15 @@ if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
40
37
set (CMAKE_CXX_FLAGS "-Wall -Wparentheses -Winline -Wbad-function-cast -Wdisabled-optimization -Wextra" )
41
38
else ()
42
39
message (STATUS "MSVC compiler in use" )
43
- set (CMAKE_CXX_FLAGS "/Wall /W2 " )
40
+ set (CMAKE_CXX_FLAGS "/Wall /W4 " )
44
41
endif ()
45
42
46
43
add_compile_definitions (NAPI_CPP_EXCEPTIONS )
44
+ add_compile_definitions (-DNAPI_VERSION=3 )
47
45
48
46
# cmake-js
49
47
set (INCLUDES ${INCLUDES} ${CMAKE_JS_INC} )
48
+ message (STATUS "Includes: ${INCLUDES} " )
50
49
set (LIBS ${LIBS} ${CMAKE_JS_LIB} )
51
50
message (STATUS "Libs: ${LIBS} " )
52
51
You can’t perform that action at this time.
0 commit comments