Skip to content

Commit

Permalink
🔖 λcommon v1.9.2: Fixed compilation issues on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
LambdAurora committed Dec 1, 2018
1 parent b4759e9 commit 40716d1
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 42 deletions.
15 changes: 5 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ project(lambdacommon)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include(GenerateExportHeader)
include(utils/CompileUtility)
include(utils/InstallUtility)

set(CMAKE_CXX_STANDARD 14)

Expand All @@ -19,7 +20,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -framework CoreFoundation -framework ApplicationServices")
endif()

# All files
# All files:
# There is the C++ header files.
set(HEADERS_CONNECTION include/lambdacommon/connection/address.h)
set(HEADERS_DOCUMENT include/lambdacommon/documents/document.h)
Expand Down Expand Up @@ -67,6 +68,7 @@ if (LAMBDACOMMON_INSTALL)
install(FILES ${LOOP_HEADER} DESTINATION ${HEADER_PARENT_DIR})
endforeach ()
install(FILES ${CMAKE_BINARY_DIR}/exports/lambdacommon_exports.h DESTINATION include/lambdacommon)
install(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION share/licenses/lambdacommon)
install(TARGETS lambdacommon
RUNTIME DESTINATION bin COMPONENT libraries
LIBRARY DESTINATION lib COMPONENT libraries
Expand All @@ -78,15 +80,8 @@ if (LAMBDACOMMON_INSTALL)
ARCHIVE DESTINATION lib COMPONENT libraries)
endif ()

# Uninstall target
if(NOT TARGET uninstall)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)

add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()
# Uninstall target.
setup_uninstall_target()
endif ()

# Build the tests if the option is on.
Expand Down
10 changes: 5 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh

# Some color variables
# Some color variables.
RED='\033[0;91m'
NC='\033[0m'

sh ./cleaningWorkspace.sh
sh ./clean_workspace.sh

echo "cd to build directory"

Expand All @@ -15,13 +15,13 @@ cmake ..
if [ $? -ne 0 ]; then
echo "${RED}Error: CMake doesn't exit with success! Cleaning...${NC}"
cd ..
sh ./cleaningWorkspace.sh
sh ./clean_workspace.sh
else
make
if [ $? -ne 0 ]; then
echo "${RED}Error: Make doesn't compile with success! Cleaning...${NC}"
echo "${RED}Error: Make doesn't exit with success! Cleaning...${NC}"
cd ..
sh ./cleaningWorkspace.sh
sh ./clean_workspace.sh
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion cleaningWorkspace.sh → clean_workspace.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

echo "Checking build directories..."

Expand Down
2 changes: 1 addition & 1 deletion cmake
Submodule cmake updated from adcaf0 to a3f64b
21 changes: 0 additions & 21 deletions cmake_uninstall.cmake.in

This file was deleted.

2 changes: 1 addition & 1 deletion include/lambdacommon/lambdacommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

#define LAMBDACOMMON_VERSION_MAJOR 1
#define LAMBDACOMMON_VERSION_MINOR 9
#define LAMBDACOMMON_VERSION_PATCH 1
#define LAMBDACOMMON_VERSION_PATCH 2

// Deletes the pointer and sets the variable to null. It's just simpler to write like this.
#define LCOMMON_DELETE_POINTER(pointer) delete pointer; pointer = nullptr;
Expand Down
1 change: 1 addition & 0 deletions src/graphics/color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "../../include/lambdacommon/maths.h"
#include <sstream>
#include <iomanip>
#include <tuple>

namespace lambdacommon
{
Expand Down
2 changes: 1 addition & 1 deletion src/system/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ namespace lambdacommon
void LAMBDACOMMON_API sleep(utime_t time)
{
#ifdef LAMBDA_WINDOWS
Sleep(time);
Sleep(static_cast<DWORD>(time));
#else
auto goal = time / 1000 * CLOCKS_PER_SEC + clock();
while (goal > clock());
Expand Down
4 changes: 2 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#!/bin/sh

# Some color variables
# Some color variables.
RED='\033[0;91m'
NC='\033[0m'

Expand Down

0 comments on commit 40716d1

Please sign in to comment.