@@ -120,6 +120,7 @@ elseif(UNIX)
120
120
if (GConf_FOUND)
121
121
list (APPEND PROXYRES_SRCS config_gnome2.c config_gnome2.h)
122
122
endif ()
123
+
123
124
list (APPEND PROXYRES_SRCS
124
125
config_env.c
125
126
config_env.h
@@ -128,8 +129,8 @@ elseif(UNIX)
128
129
config_kde.c
129
130
config_kde.h
130
131
event_pthread.c
131
- execute_jscore .c
132
- execute_jscore .h
132
+ execute_jsc .c
133
+ execute_jsc .h
133
134
mutex_pthread.c
134
135
net_adapter_linux.c
135
136
resolver_gnome3.c
@@ -186,7 +187,7 @@ if(PROXYRES_CODE_COVERAGE AND NOT MSVC)
186
187
endif ()
187
188
188
189
add_library (proxyres ${PROXYRES_SRCS} )
189
- set_property (TARGET proxyres PROPERTY C_STANDARD 99 )
190
+ set_property (TARGET proxyres PROPERTY C_STANDARD 11 )
190
191
target_include_directories (proxyres PRIVATE
191
192
${CMAKE_CURRENT_SOURCE_DIR}
192
193
${CMAKE_CURRENT_SOURCE_DIR} /include /proxyres)
@@ -284,6 +285,8 @@ elseif(APPLE)
284
285
target_link_libraries (proxyres ${CMAKE_THREAD_LIBS_INIT} )
285
286
286
287
set_target_properties (proxyres PROPERTIES LINK_FLAGS -Wl,-F/Library/Frameworks)
288
+
289
+ target_compile_definitions (proxyres PRIVATE HAVE_JSCORE)
287
290
elseif (UNIX )
288
291
pkg_check_modules(deps REQUIRED IMPORTED_TARGET glib-2.0)
289
292
target_link_libraries (proxyres PkgConfig::deps)
@@ -294,9 +297,18 @@ elseif(UNIX)
294
297
target_compile_definitions (proxyres PRIVATE HAVE_GCONF)
295
298
endif ()
296
299
297
- pkg_search_module(JSCoreGTK REQUIRED javascriptcoregtk-4.1 javascriptcoregtk-4.0 javascriptcoregtk-3.0 javascriptcoregtk-1.0)
298
- # Don't link libraries at compile time since we dynamically load them at runtime
299
- target_include_directories (proxyres PRIVATE ${JSCoreGTK_INCLUDE_DIRS} )
300
+ pkg_search_module(JSCoreGTK REQUIRED javascriptcoregtk-6.0 javascriptcoregtk-4.1 javascriptcoregtk-4.0)
301
+ if (JSCoreGTK_FOUND)
302
+ # Don't link libraries at compile time since we dynamically load them at runtime
303
+ target_include_directories (proxyres PRIVATE ${JSCoreGTK_INCLUDE_DIRS} )
304
+ target_compile_definitions (proxyres PRIVATE HAVE_JSC)
305
+
306
+ pkg_check_modules(GObject REQUIRED gobject-2.0)
307
+ if (GObject_FOUND)
308
+ target_include_directories (proxyres PRIVATE ${GObject_INCLUDE_DIRS} )
309
+ target_link_libraries (proxyres ${GObject_LIBRARIES} )
310
+ endif ()
311
+ endif ()
300
312
301
313
find_package (Threads REQUIRED)
302
314
target_compile_definitions (proxyres PRIVATE HAVE_PTHREADS)
0 commit comments