From b009a64dcda8ce0e79c5683d4c0931b109fac894 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Sun, 9 Feb 2014 11:15:17 +0000
Subject: [PATCH] Remove leftover bits of the X11 option. Fix up finding
 packages.

---
 src/conio/CMakeLists.txt | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/conio/CMakeLists.txt b/src/conio/CMakeLists.txt
index 6f5b1068ac..3bf0274b12 100644
--- a/src/conio/CMakeLists.txt
+++ b/src/conio/CMakeLists.txt
@@ -26,11 +26,9 @@ if(CURSES_FOUND)
 endif()
 
 if(X11_FOUND)
-	if(X11)
-		list(APPEND SOURCE x_events.c x_cio.c)
-		set(NEED_BITMAP TRUE)
-		set(NEED_DLOPEN TRUE)
-	endif()
+	list(APPEND SOURCE x_events.c x_cio.c)
+	set(NEED_BITMAP TRUE)
+	set(NEED_DLOPEN TRUE)
 endif()
 
 if(SDL_FOUND)
@@ -48,9 +46,11 @@ if(NEED_BITMAP)
 endif()
 
 add_library(ciolib SHARED ${SOURCE})
-find_package(XPDev REQUIRED)
-include(${XPDev_CONFIG})
-add_dependencies(ciolib xpdev)
+if(NOT ${PARENT_DIRECTORY})
+	find_package(XPDev REQUIRED)
+	include(${XPDev_CONFIG})
+endif()
+add_dependencies(ciolib XPDev)
 target_include_directories(ciolib PRIVATE "${XPDev_DIR}/../../../include/xpdev")
 target_compile_definitions(ciolib PRIVATE $<TARGET_PROPERTY:xpdev,INTERFACE_COMPILE_DEFINITIONS>)
 target_include_directories(ciolib PRIVATE $<TARGET_PROPERTY:xpdev,INTERFACE_INCLUDE_DIRECTORIES>)
@@ -85,7 +85,6 @@ set(INSTALL_HEADERS
 )
 
 export(PACKAGE CIOLib)
-export(TARGETS ciolib FILE CIOLibConfig.cmake)
 
 install(TARGETS ciolib DESTINATION lib EXPORT CIOLibConfig)
 install(FILES ${INSTALL_HEADERS} DESTINATION include)
-- 
GitLab