forked from ivansafrin/Polycode
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
1bf0c87
commit fe565d2
Showing
31 changed files
with
3,156 additions
and
24 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
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
|
||
SET(LUA_SEARCH_PATHS | ||
${POLYCODE_RELEASE_DIR}/Framework/Core/Dependencies/lib | ||
${POLYCODE_RELEASE_DIR}/Framework/Core/Dependencies/include | ||
${POLYCODE_RELEASE_DIR}/Framework/Core/Dependencies/include/lua5.1 | ||
${POLYCODE_RELEASE_DIR}/Framework/Modules/Dependencies/lib | ||
${POLYCODE_RELEASE_DIR}/Framework/Tools/Dependencies/lib | ||
) | ||
|
||
SET(MSVC_YEAR_NAME) | ||
IF (MSVC_VERSION GREATER 1599) # >= 1600 | ||
SET(MSVC_YEAR_NAME VS2010) | ||
ELSEIF(MSVC_VERSION GREATER 1499) # >= 1500 | ||
SET(MSVC_YEAR_NAME VS2008) | ||
ELSEIF(MSVC_VERSION GREATER 1399) # >= 1400 | ||
SET(MSVC_YEAR_NAME VS2005) | ||
ELSEIF(MSVC_VERSION GREATER 1299) # >= 1300 | ||
SET(MSVC_YEAR_NAME VS2003) | ||
ELSEIF(MSVC_VERSION GREATER 1199) # >= 1200 | ||
SET(MSVC_YEAR_NAME VS6) | ||
ENDIF() | ||
|
||
FIND_PATH(LUA_INCLUDE_DIR | ||
NAMES lua.h | ||
HINTS | ||
$ENV{LUADIR} | ||
$ENV{LUA_PATH} | ||
PATH_SUFFIXES include include/lua5.1 lua5.1 | ||
PATHS ${LUA_SEARCH_PATHS} | ||
) | ||
|
||
FIND_LIBRARY(LUA_LIBRARY | ||
NAMES lua5.1 liblua5.1 | ||
HINTS | ||
NO_DEFAULT_PATH | ||
NO_CMAKE_ENVIRONMENT_PATH | ||
NO_CMAKE_SYSTEM_PATH | ||
NO_SYSTEM_ENVIRONMENT_PATH | ||
NO_CMAKE_PATH | ||
CMAKE_FIND_FRAMEWORK NEVER | ||
$ENV{LUADIR} | ||
$ENV{LUA_PATH} | ||
PATH_SUFFIXES lib lib64 win32/Dynamic_Release "Win32/${MSVC_YEAR_NAME}/x64/Release" "Win32/${MSVC_YEAR_NAME}/Win32/Release" | ||
PATHS ${LUA_SEARCH_PATHS} | ||
) | ||
|
||
# First search for d-suffixed libs | ||
FIND_LIBRARY(LUA_LIBRARY_DEBUG | ||
NAMES lua5.1d liblua5.1d | ||
HINTS | ||
NO_DEFAULT_PATH | ||
NO_CMAKE_ENVIRONMENT_PATH | ||
NO_CMAKE_SYSTEM_PATH | ||
NO_SYSTEM_ENVIRONMENT_PATH | ||
NO_CMAKE_PATH | ||
CMAKE_FIND_FRAMEWORK NEVER | ||
$ENV{LUADIR} | ||
$ENV{LUA_PATH} | ||
PATH_SUFFIXES lib lib64 win32/Dynamic_Debug "Win32/${MSVC_YEAR_NAME}/x64/Debug" "Win32/${MSVC_YEAR_NAME}/Win32/Debug" | ||
PATHS ${LUA_SEARCH_PATHS} | ||
) | ||
|
||
IF(NOT LUA_LIBRARY_DEBUG) | ||
# Then search for non suffixed libs if necessary, but only in debug dirs | ||
FIND_LIBRARY(LUA_LIBRARY_DEBUG | ||
NAMES lua liblua libliblua | ||
HINTS | ||
NO_DEFAULT_PATH | ||
NO_CMAKE_ENVIRONMENT_PATH | ||
NO_CMAKE_SYSTEM_PATH | ||
NO_SYSTEM_ENVIRONMENT_PATH | ||
NO_CMAKE_PATH | ||
CMAKE_FIND_FRAMEWORK NEVER | ||
$ENV{LUADIR} | ||
$ENV{LUA_PATH} | ||
PATH_SUFFIXES win32/Dynamic_Debug "Win32/${MSVC_YEAR_NAME}/x64/Debug" "Win32/${MSVC_YEAR_NAME}/Win32/Debug" | ||
PATHS ${LUA_SEARCH_PATHS} | ||
) | ||
ENDIF() | ||
|
||
|
||
IF(LUA_LIBRARY) | ||
IF(LUA_LIBRARY_DEBUG) | ||
SET(LUA_LIBRARIES optimized "${LUA_LIBRARY}" debug "${LUA_LIBRARY_DEBUG}") | ||
ELSE() | ||
SET(LUA_LIBRARIES "${LUA_LIBRARY}") # Could add "general" keyword, but it is optional | ||
ENDIF() | ||
ENDIF() | ||
|
||
# handle the QUIETLY and REQUIRED arguments and set XXX_FOUND to TRUE if all listed variables are TRUE | ||
INCLUDE(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LUA DEFAULT_MSG LUA_LIBRARIES LUA_INCLUDE_DIR) |
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
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
Oops, something went wrong.