From 90ab171054db4383143c1a606b7c659bbcba5f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lien=20Sell=C3=A6g?= Date: Thu, 8 Oct 2015 15:09:11 +0200 Subject: [PATCH] More dynamic cmakelists and guarding of windows code --- src/CMakeLists.txt | 12 ++++++++++-- src/dialogs_win.cc | 4 +++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 82e9cfe..aa08c91 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -70,6 +70,7 @@ set(source_files juci.h sourcefile.cc window.cc window.h + dialogs.h # api.h # api.cc notebook.cc @@ -88,11 +89,16 @@ set(source_files juci.h if(MSYS) list(APPEND source_files terminal_win.cc) - list(APPEND source_files dialogs_win.cc) + list(APPEND source_files dialogs_win.cc) + set(DIALOGS_INCLUDE_DIRS "../WIN-packages/") + # if (64 bit) + set(DIALOGS_LIBRARY_DIRS "../WIN-packages/x64/libdialogs.dll") + # else + # set(DIALOGS_LIBRARY_DIRS "../WIN-packages/x32/libdialogs.dll") + #TODO figure out how to do this.... message("MSYS detected") else() list(APPEND source_files terminal.cc) - list(APPEND source_files dialogs.h) list(APPEND source_files dialogs.cc) message("UNIX detected") endif() @@ -110,6 +116,7 @@ if(${validation}) ${GTKMM_INCLUDE_DIRS} ${GTKSVMM_INCLUDE_DIRS} ${LCL_INCLUDE_DIRS} + ${DIALOGS_INCLUDE_DIRS} ${LIBCLANG_INCLUDE_DIRS} ${ASPELL_INCLUDE_DIR}) @@ -134,6 +141,7 @@ if(${validation}) ${GTKSVMM_LIBRARIES} ${Boost_LIBRARIES} ${ASPELL_LIBRARIES} + ${DIALOGS_LIBRARIES} # ${PYTHON_LIBRARIES} ) diff --git a/src/dialogs_win.cc b/src/dialogs_win.cc index 24133b1..dd3ed51 100644 --- a/src/dialogs_win.cc +++ b/src/dialogs_win.cc @@ -1,3 +1,4 @@ +#ifdef _WIN32 #include "dialogs.h" #include @@ -19,4 +20,5 @@ std::string Dialog::select_file() { std::string Dialog::save_file() { return c_save_file(); -} \ No newline at end of file +} +#endif \ No newline at end of file