target_link_libraries(freerdp-kbd ${X11_LIBRARIES})
endif()
-find_suggested_package(XKBFile)
-if(XKBFILE_FOUND)
- add_definitions(-DWITH_XKBFILE)
- include_directories(${XKBFILE_INCLUDE_DIRS})
- target_link_libraries(freerdp-kbd ${XKBFILE_LIBRARIES})
+if(NOT APPLE)
+ find_suggested_package(XKBFile)
+ if(XKBFILE_FOUND)
+ add_definitions(-DWITH_XKBFILE)
+ include_directories(${XKBFILE_INCLUDE_DIRS})
+ target_link_libraries(freerdp-kbd ${XKBFILE_LIBRARIES})
+ endif()
endif()
add_definitions(-DKEYMAP_PATH="${FREERDP_KEYMAP_PATH}")
if((fp = fopen(xkbfilepath, "r")) == NULL)
{
- /* If ran from the source tree, the keymaps will be in the parent directory */
- snprintf(xkbfilepath, sizeof(xkbfilepath), "../keymaps/%s", xkbfile);
+ /* If ran from the root of the source tree */
+ snprintf(xkbfilepath, sizeof(xkbfilepath), "./keymaps/%s", xkbfile);
+
+ /* If ran from the client directory */
+ if((fp = fopen(xkbfilepath, "r")) == NULL)
+ snprintf(xkbfilepath, sizeof(xkbfilepath), "../../keymaps/%s", xkbfile);
if((fp = fopen(xkbfilepath, "r")) == NULL)
{