Browse Source

More dynamic cmakelists and guarding of windows code

merge-requests/365/head
Jørgen Lien Sellæg 10 years ago
parent
commit
90ab171054
  1. 12
      src/CMakeLists.txt
  2. 4
      src/dialogs_win.cc

12
src/CMakeLists.txt

@ -70,6 +70,7 @@ set(source_files juci.h
sourcefile.cc sourcefile.cc
window.cc window.cc
window.h window.h
dialogs.h
# api.h # api.h
# api.cc # api.cc
notebook.cc notebook.cc
@ -88,11 +89,16 @@ set(source_files juci.h
if(MSYS) if(MSYS)
list(APPEND source_files terminal_win.cc) 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") message("MSYS detected")
else() else()
list(APPEND source_files terminal.cc) list(APPEND source_files terminal.cc)
list(APPEND source_files dialogs.h)
list(APPEND source_files dialogs.cc) list(APPEND source_files dialogs.cc)
message("UNIX detected") message("UNIX detected")
endif() endif()
@ -110,6 +116,7 @@ if(${validation})
${GTKMM_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS}
${GTKSVMM_INCLUDE_DIRS} ${GTKSVMM_INCLUDE_DIRS}
${LCL_INCLUDE_DIRS} ${LCL_INCLUDE_DIRS}
${DIALOGS_INCLUDE_DIRS}
${LIBCLANG_INCLUDE_DIRS} ${LIBCLANG_INCLUDE_DIRS}
${ASPELL_INCLUDE_DIR}) ${ASPELL_INCLUDE_DIR})
@ -134,6 +141,7 @@ if(${validation})
${GTKSVMM_LIBRARIES} ${GTKSVMM_LIBRARIES}
${Boost_LIBRARIES} ${Boost_LIBRARIES}
${ASPELL_LIBRARIES} ${ASPELL_LIBRARIES}
${DIALOGS_LIBRARIES}
# ${PYTHON_LIBRARIES} # ${PYTHON_LIBRARIES}
) )

4
src/dialogs_win.cc

@ -1,3 +1,4 @@
#ifdef _WIN32
#include "dialogs.h" #include "dialogs.h"
#include <c_dialogs.h> #include <c_dialogs.h>
@ -19,4 +20,5 @@ std::string Dialog::select_file() {
std::string Dialog::save_file() { std::string Dialog::save_file() {
return c_save_file(); return c_save_file();
} }
#endif
Loading…
Cancel
Save