From c69654ce136fa6e7c097f9458ea999e66d6340bc Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Sun, 16 Nov 2014 16:13:15 +0100 Subject: Look for re2c in path when compiling with MSVC --- src/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 691e268..c5814e0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -40,14 +40,13 @@ set(PROGRAM_SOURCES include_directories(. html ${CMAKE_CURRENT_BINARY_DIR}) +set(RE2C re2c) if (MSVC) - set(RE2C ${CMAKE_CURRENT_SOURCE_DIR}/re2c) file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} DOS_CURRENT_SOURCE_DIR) add_custom_command( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/scanners.c DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scanners.re COMMAND ${RE2C} --case-insensitive -b -i ${DOS_CURRENT_SOURCE_DIR}\\scanners.re >${DOS_CURRENT_SOURCE_DIR}\\scanners.c) else(MSVC) - set(RE2C re2c) add_custom_command( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/scanners.c DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scanners.re COMMAND ${RE2C} --case-insensitive -b -i ${CMAKE_CURRENT_SOURCE_DIR}/scanners.re >${CMAKE_CURRENT_SOURCE_DIR}/scanners.c) -- cgit v1.2.3