 +if(UNIX)
 +  ###################
 +  # wxWidgets
++  set(wxWidgets_CONFIG_EXECUTABLE ${externpro}/bin/wx-config)
 +  if(${CMAKE_BUILD_TYPE} MATCHES Debug)
 +    set(wxWidgets_CONFIG_OPTIONS --prefix=${externpro} --version=${wxver} --debug=yes)
 +  else()
 +    set(wxWidgets_CONFIG_OPTIONS --prefix=${externpro} --version=${wxver} --debug=no)
 +  endif()
-+  # NOTE: find_program wasn't always working, so changed to set
-+  set(wxWidgets_CONFIG_EXECUTABLE ${externpro}/bin/wx-config)
 +  find_package(wxWidgets REQUIRED)
 +  include(${wxWidgets_USE_FILE})
-+  #set(wx_DEBUG TRUE)
 +  if(wx_DEBUG)
 +    message(STATUS "wxWidgets_USE_FILE: ${wxWidgets_USE_FILE}")
 +    message(STATUS "wxWidgets_INCLUDE_DIRS: ${wxWidgets_INCLUDE_DIRS}")

+      # wxplotctrl plotdraw.cpp needs to include wx/gtk/dcclient.h when building against gtk2
+      include_directories(${WX_SOURCE}/include)
+    endif()
+  endif() # NOT Darwin
+elseif(MSVC)
+  set(wxbasename wxxmsw)
+  # find wx headers and custom wx/setup.h

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..74273a3
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,102 @@
+cmake_minimum_required(VERSION 3.0)
+project(wxx)
+include(flags OPTIONAL)
