[DEV] cmake file update

This commit is contained in:
Edouard DUPIN 2014-03-04 21:18:41 +01:00
parent def986ab82
commit 17101a38b0
7 changed files with 24 additions and 19 deletions

View File

@ -64,6 +64,13 @@ set(src_files
add_definitions( -DDEBUG_LEVEL=3 )
add_definitions( -DDEBUG=1 )
add_definitions( -DPROJECT_NAME="edn" )
if (APPLE)
add_definitions( -D__TARGET_OS__MacOs )
elseif (UNIX)
add_definitions( -D__TARGET_OS__Linux )
elseif (WIN32)
add_definitions( -D__TARGET_OS__Windows )
endif ()
# read version :
file (STRINGS "tag" BUILD_VERSION)
add_definitions( -DAPPL_VERSION="${BUILD_VERSION}" )
@ -86,7 +93,18 @@ include_directories(${ewol_SOURCE_DIR})
#target_link_libraries(edn ewol)
target_link_libraries(edn ewol linearmath zlib etk freetype exml ejson egami edtaa3 date esvg png)
if (APPLE)
target_link_libraries(edn
"-framework Cocoa"
"-framework OpenGL"
"-framework QuartzCore"
"-framework AppKit"
)
elseif (UNIX)
target_link_libraries(edn -lGL -lX11 -lpthread)
elseif (WIN32)
endif ()
add_definitions( -D__TARGET_OS__Linux )

View File

@ -619,8 +619,6 @@ bool appl::Buffer::copy(std::string& _data) {
void appl::Buffer::copy(std::string& _data, const appl::Buffer::Iterator& _pos, const appl::Buffer::Iterator& _posEnd) {
_data.clear();
int64_t startPos = getStartSelectionPos();
int64_t endPos = getStopSelectionPos();
for (Iterator it = _pos;
it != _posEnd &&
(bool)it == true;

View File

@ -395,22 +395,22 @@ void MainWindows::onReceiveMessage(const ewol::object::Message& _msg) {
} else if (_msg.getMessage() == ednMsgGuiSave) {
APPL_DEBUG("Request saving the file : " << _msg.getData());
if (std::tolower(_msg.getData()) == "current") {
appl::WorkerSaveFile* tmpWorker = new appl::WorkerSaveFile("", false);
new appl::WorkerSaveFile("", false);
return;
} else if (std::tolower(_msg.getData()) == "all") {
appl::WorkerSaveAllFile* tmpWorker = new appl::WorkerSaveAllFile();
new appl::WorkerSaveAllFile();
return;
} else {
APPL_ERROR("UNKNOW request : " << _msg);
}
} else if (_msg.getMessage() == ednMsgGuiSaveAs) {
appl::WorkerSaveFile* tmpWorker = new appl::WorkerSaveFile("", true);
new appl::WorkerSaveFile("", true);
} else if (_msg.getMessage() == ednMsgGuiClose) {
// Get a ref on the buffer selected (if null, no buffer was selected ...)
if (_msg.getData() == "current") {
appl::WorkerCloseFile* tmpWorker = new appl::WorkerCloseFile("");
new appl::WorkerCloseFile("");
} else {
appl::WorkerCloseAllFile* tmpWorker = new appl::WorkerCloseAllFile();
new appl::WorkerCloseAllFile();
}
} else if (_msg.getMessage() == mainWindowsRequestSaveFile) { // return after a choice of close...
if (m_bufferManager->exist(_msg.getData()) == false) {

View File

@ -19,7 +19,6 @@
class MainWindows : public ewol::widget::Windows {
private:
int32_t m_currentSavingAsIdBuffer;
ewol::widget::Label* m_widgetLabelFileName;
public:
// Constructeur

View File

@ -36,12 +36,8 @@ appl::TagFileSelection::TagFileSelection(void) {
addEventId(applEventctagsCancel);
ewol::widget::Label* myWidgetTitle = NULL;
ewol::widget::Button* myWidgetValidate = NULL;
ewol::widget::Button* myWidgetCancel = NULL;
ewol::widget::Sizer * mySizerVert = NULL;
ewol::widget::Sizer * mySizerHori = NULL;
ewol::widget::Spacer * mySpacer = NULL;
#if defined(__TARGET_OS__Android)
setMinSize(ewol::Dimension(vec2(90,90),ewol::Dimension::Pourcent));
#elif defined(__TARGET_OS__Windows)

View File

@ -129,14 +129,11 @@ void appl::TextViewer::onRegenerateDisplay(void) {
vec3 tmpCursorPosition(0, 0, -1);
float tmpCursorLenght = -1.0;
// real display ...
etk::Buffer& buf = m_buffer->getData();
m_displayText.setColor(etk::Color<>(0, 0, 0, 256));
float countNbLine = 1;
int32_t countColomn = 0;
// the siplay string :
std::u32string stringToDisplay;
int64_t bufferElementSize = 0;
bool isSelect = false;
appl::Buffer::Iterator selectPosStart = m_buffer->begin();
appl::Buffer::Iterator selectPosStop = m_buffer->begin();
if (m_buffer->hasTextSelected() == true) {
@ -352,7 +349,6 @@ bool appl::TextViewer::onEventEntry(const ewol::event::Entry& _event) {
m_buffer->setSelectMode(false);
// normal adding char ...
char output[5];
int32_t nbElement = u32char::convertUtf8(localValue, output);
if ( m_buffer->hasTextSelected() == false
&& _event.getSpecialKey().getInsert() == true) {
appl::Buffer::Iterator pos = m_buffer->cursor();
@ -368,7 +364,6 @@ bool appl::TextViewer::onEventEntry(const ewol::event::Entry& _event) {
}
// move events ...
if (_event.getStatus() == ewol::key::statusDown) {
bool needUpdatePosition = true;
// selection when shift is set:
m_buffer->setSelectMode(_event.getSpecialKey().getShift());
// check selection event ...

View File

@ -100,7 +100,6 @@ appl::Highlight::Highlight(const std::string& _xmlFilename, const std::string& _
}
appl::Highlight::~Highlight(void) {
int32_t i;
// clean all Element
for (int32_t iii = 0; iii < m_listHighlightPass1.size(); ++iii) {
if (m_listHighlightPass1[iii] != NULL) {