Skip to content

Commit 698ff00

Browse files
committed
Add libuihook dependency
1 parent 3876570 commit 698ff00

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

CMakeLists.txt

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ include(CPack)
1616

1717
nodejs_init()
1818

19+
if(APPLE AND NOT UIOHOOKDIR)
20+
message(FATAL_ERROR "UIOHOOKDIR variable is missing. Please set this variable to specify path to the build dir of libuiohook")
21+
endif()
22+
23+
message (STATUS "Path to uiohook dir " ${UIOHOOKDIR}/include/)
24+
1925
#############################
2026
# Source, Libraries & Directories
2127
#############################
@@ -34,6 +40,11 @@ SET(PROJECT_INCLUDE_PATHS
3440
"${CMAKE_SOURCE_DIR}/source/"
3541
)
3642

43+
if(APPLE)
44+
list(APPEND PROJECT_INCLUDE_PATHS "${UIOHOOKDIR}/include/")
45+
list(APPEND PROJECT_LIBRARIES "${UIOHOOKDIR}/lib/libuiohook.dylib")
46+
endif()
47+
3748
#############################
3849
# Building
3950
#############################
@@ -92,8 +103,18 @@ INSTALL(TARGETS ${PROJECT_NAME}
92103
RUNTIME DESTINATION "./" COMPONENT Runtime
93104
LIBRARY DESTINATION "./" COMPONENT Runtime
94105
)
95-
INSTALL(FILES $<TARGET_PDB_FILE:${PROJECT_NAME}> DESTINATION ./ OPTIONAL)
96106

107+
if(WIN32)
108+
INSTALL(FILES $<TARGET_PDB_FILE:${PROJECT_NAME}> DESTINATION ./ OPTIONAL)
109+
endif()
110+
111+
if(APPLE)
112+
INSTALL (
113+
DIRECTORY "${UIOHOOKDIR}/lib/"
114+
DESTINATION "./"
115+
FILES_MATCHING PATTERN "*.dylib"
116+
)
117+
endif()
97118

98119
# JavaScript
99120
INSTALL(

0 commit comments

Comments
 (0)