-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
124 changed files
with
56 additions
and
20,454 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ project(lua) | |
|
||
set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
add_subdirectory(src/) | ||
|
||
add_subdirectory(toluapp-simple/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED True) | ||
set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
|
||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) | ||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) | ||
|
||
set(TOLUA_BIN_SRC | ||
tolua.c | ||
toluabind.c | ||
) | ||
|
||
set(TOLUA_LIB_SRC | ||
tolua_event.c | ||
tolua_is.c | ||
tolua_map.c | ||
tolua_push.c | ||
tolua_to.c | ||
) | ||
|
||
|
||
add_library(toluapp51 STATIC "${TOLUA_LIB_SRC}") | ||
add_library(toluapp51_shared SHARED "${TOLUA_LIB_SRC}") | ||
set_target_properties(toluapp51_shared PROPERTIES OUTPUT_NAME "toluapp51") | ||
add_executable(toluapp "${TOLUA_BIN_SRC}" "${TOLUA_LIB_SRC}") | ||
|
||
if(MSVC) | ||
target_link_libraries(toluapp51 PUBLIC "${PROJECT_BINARY_DIR}/$<CONFIGURATION>/lua51.lib" ${CMAKE_DL_LIBS}) | ||
target_link_libraries(toluapp51_shared PUBLIC "${PROJECT_BINARY_DIR}/$<CONFIGURATION>/lua51.lib" ${CMAKE_DL_LIBS}) | ||
target_link_libraries(toluapp PUBLIC "${PROJECT_BINARY_DIR}/$<CONFIGURATION>/lua51.lib" ${CMAKE_DL_LIBS}) | ||
else() | ||
target_link_libraries(toluapp51 PUBLIC "${PROJECT_BINARY_DIR}/liblua51.a" ${CMAKE_DL_LIBS}) | ||
target_link_libraries(toluapp51_shared PUBLIC "${PROJECT_BINARY_DIR}/liblua51.a" ${CMAKE_DL_LIBS}) | ||
target_link_libraries(toluapp PUBLIC "${PROJECT_BINARY_DIR}/liblua51.a" ${CMAKE_DL_LIBS}) | ||
endif(MSVC) | ||
|
||
add_custom_command(TARGET toluapp51 POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/toluapp-simple/tolua++.h" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) | ||
|
||
set_target_properties(toluapp PROPERTIES | ||
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR} | ||
) | ||
|
||
set_target_properties(toluapp51 PROPERTIES LINKER_LANGUAGE CXX) | ||
set_target_properties(toluapp51_shared PROPERTIES LINKER_LANGUAGE CXX) | ||
set_target_properties(toluapp PROPERTIES LINKER_LANGUAGE CXX) | ||
|
||
add_dependencies(toluapp51_shared lua51 lua51_shared lua51_static) | ||
add_dependencies(toluapp51 lua51 lua51_shared lua51_static) | ||
add_dependencies(toluapp lua51 lua51_shared lua51_static) | ||
|
||
include_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.