summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2014-11-16 16:13:15 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2014-11-16 22:17:36 +0100
commitc69654ce136fa6e7c097f9458ea999e66d6340bc (patch)
tree4cc159e30414e6bb5d16f8225ed22ded4e3d5b41 /src
parent627326bed4e58cf457e8c8f2c45b2e6d7c316a54 (diff)
Look for re2c in path when compiling with MSVC
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt3
1 files changed, 1 insertions, 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)