Use cl(the MS C/C++ compiler) instead of cc for MSVC build.
This commit is contained in:
parent
f7186a6493
commit
95e1a35d4c
|
@ -203,8 +203,14 @@ IF(CMAKE_HOST_WIN32)
|
||||||
SET(BIN2C ${BIN2C}.exe)
|
SET(BIN2C ${BIN2C}.exe)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
IF(MSVC)
|
||||||
|
SET(NATIVE_CC cl)
|
||||||
|
ELSE(MSVC)
|
||||||
|
SET(NATIVE_CC cc)
|
||||||
|
ENDIF(MSVC)
|
||||||
|
|
||||||
ADD_CUSTOM_COMMAND(OUTPUT ${BIN2C}
|
ADD_CUSTOM_COMMAND(OUTPUT ${BIN2C}
|
||||||
COMMAND cc ${CMAKE_CURRENT_SOURCE_DIR}/bin2c.c -o ${BIN2C}
|
COMMAND ${NATIVE_CC} ${CMAKE_CURRENT_SOURCE_DIR}/bin2c.c -o ${BIN2C}
|
||||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin2c.c)
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin2c.c)
|
||||||
ADD_CUSTOM_COMMAND(OUTPUT wxvbam.xrs
|
ADD_CUSTOM_COMMAND(OUTPUT wxvbam.xrs
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
|
|
@ -34,7 +34,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
#ifndef _MSC_VER
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
#include <wctype.h>
|
#include <wctype.h>
|
||||||
|
|
||||||
#define BUF_SIZE 4096
|
#define BUF_SIZE 4096
|
||||||
|
|
Loading…
Reference in New Issue