summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Drahoš <drahosp@gmail.com>2012-10-02 17:49:02 +0200
committerPeter Drahoš <drahosp@gmail.com>2012-10-02 17:49:02 +0200
commit59da638d4f1fe2a7c4fbef632d080536bc2a9b2e (patch)
treefea7a129860c0db2e6e725a7470a44f301ff925a
parent99641870d948f42ccdcd6f0d8ecb13d0340b8614 (diff)
downloadlua-59da638d4f1fe2a7c4fbef632d080536bc2a9b2e.tar.gz
LUA_BUILD_AS_DLL needs to affect only the liblua target
-rw-r--r--CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 06267a0..84d2d9a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,9 +40,6 @@ if ( WIN32 AND NOT CYGWIN )
# Windows systems
option ( LUA_WIN "Windows specific build." ON )
option ( LUA_BUILD_AS_DLL "Build Lua library as Dll." ${BUILD_SHARED_LIBS} )
- if ( LUA_BUILD_AS_DLL )
- add_definitions ( -DLUA_BUILD_AS_DLL )
- endif ()
# Paths (Double escapes ne option ( LUA_BUILD_AS_DLL "Build Lua library as Dll." ON )eded)
set ( LUA_DIRSEP "\\\\" )
@@ -125,6 +122,9 @@ endif ( )
add_library ( liblua SHARED ${SRC_CORE} ${SRC_LIB} ${LUA_DLL_RC} ${LUA_DEF} )
target_link_libraries ( liblua ${LIBS} )
set_target_properties ( liblua PROPERTIES OUTPUT_NAME lua CLEAN_DIRECT_OUTPUT 1 )
+if ( LUA_BUILD_AS_DLL )
+ set_target_properties ( liblua PROPERTIES COMPILE_DEFINITIONS LUA_BUILD_AS_DLL )
+endif ()
add_executable ( lua ${SRC_LUA} src/lua.rc )
target_link_libraries ( lua liblua )