VC++ simu DLL compilation fixes
This commit is contained in:
@@ -878,7 +878,10 @@ foreach(FILE ${PULSES_SRC})
|
||||
endforeach()
|
||||
|
||||
add_definitions(-DCORRECT_NEGATIVE_SHIFTS)
|
||||
add_definitions(-Wall -Wno-strict-aliasing -Wformat -Wreturn-type -Wunused -Wuninitialized -Wunknown-pragmas -Wno-switch -Wtype-limits)
|
||||
|
||||
if(NOT WIN32)
|
||||
add_definitions(-Wall -Wno-strict-aliasing -Wformat -Wreturn-type -Wunused -Wuninitialized -Wunknown-pragmas -Wno-switch -Wtype-limits)
|
||||
endif()
|
||||
|
||||
add_subdirectory(targets/simu)
|
||||
if(NOT WIN32)
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "diskio.h"
|
||||
#include "opentx.h"
|
||||
|
||||
const char * sdCheckAndCreateDirectory(const char * path)
|
||||
|
||||
@@ -4,7 +4,7 @@ endforeach()
|
||||
|
||||
set(SIMU_SRC ${SIMU_SRC} simpgmspace.cpp)
|
||||
|
||||
add_definitions(-DSIMU -g)
|
||||
add_definitions(-DSIMU)
|
||||
remove_definitions(-DCLI)
|
||||
|
||||
if(Qt5Widgets_FOUND)
|
||||
@@ -19,6 +19,15 @@ if(Qt5Widgets_FOUND)
|
||||
add_custom_target(opentx-simulator DEPENDS ${SIMULATOR_TARGET})
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set(CMAKE_CXX_FLAGS "/EHsc /LD")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /FORCE:MULTIPLE")
|
||||
include_directories(${PROJECT_SOURCE_DIR}/winbuild C:/Programs/pthreads/Pre-built.2/include C:/Programs/msinttypes C:/Programs/dirent/include)
|
||||
target_link_libraries(${SIMULATOR_TARGET} PRIVATE C:/Programs/pthreads/Pre-built.2/lib/pthreadVC2.lib)
|
||||
else()
|
||||
add_definitions(-g)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
add_executable(simu WIN32 ${SIMU_SRC} ../../simu.cpp)
|
||||
add_dependencies(simu ${FIRMWARE_DEPENDENCIES})
|
||||
@@ -48,4 +57,3 @@ if(APPLE)
|
||||
endforeach()
|
||||
add_custom_target(opentx-simulators-bundle DEPENDS ${SIMULATOR_BUNDLES})
|
||||
endif(APPLE)
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ extern int g_snapshot_idx;
|
||||
#ifndef __GNUC__
|
||||
#include <windows.h>
|
||||
#define sleep(x) Sleep(x)
|
||||
#define strcasecmp _stricmp
|
||||
#define strncasecmp _tcsnicmp
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#define sleep(x) usleep(1000*x)
|
||||
@@ -321,7 +323,6 @@ extern void rxPdcUsart( void (*pChProcess)(uint8_t x) );
|
||||
#define FE0 0
|
||||
|
||||
#define ISR(x, ...) void x()
|
||||
#define asm(x)
|
||||
|
||||
#if defined(CPUARM)
|
||||
extern uint32_t Master_frequency;
|
||||
|
||||
Reference in New Issue
Block a user