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. 2
      src/dialogs_win.cc

12
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}
)

2
src/dialogs_win.cc

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