few improvements in compilation on mac

This commit is contained in:
filux
2015-10-26 20:56:55 +01:00
parent 75077c4a50
commit 9932920712
6 changed files with 50 additions and 33 deletions

View File

@@ -129,6 +129,11 @@ find_path(LUA_INCLUDE_DIR lua.h
)
unset(_lua_include_subdirs)
IF(STATIC_LUA AND APPLE)
# at least in mac ports, static lib is without numbers in name
SET(_lua_library_names lua.a liblua.a ${_lua_library_names})
ENDIF()
find_library(LUA_LIBRARY
NAMES ${_lua_library_names} lua
HINTS

View File

@@ -41,9 +41,10 @@ SET(MINIUPNPC_DIR_SEARCH $ENV{MINIUPNPC_ROOT})
# PATH_SUFFIXES miniupnpc)
FIND_PATH(MINIUPNP_INCLUDE_DIR miniupnpc.h
${MINIUPNPC_DIR_SEARCH}/include/miniupnpc
/usr/include/miniupnpc
/usr/local/include/miniupnpc)
PATHS ${MINIUPNPC_DIR_SEARCH}/include
/usr/include
/usr/local/include
PATH_SUFFIXES miniupnpc)
#message(STATUS "Finding miniupnpc.h result: ${MINIUPNP_INCLUDE_DIR}")
@@ -58,13 +59,12 @@ FIND_LIBRARY(MINIUPNP_LIBRARY NAMES ${MINIUPNPC_LIBRARY_NAMES})
#message(STATUS "Finding miniupnpc lib result: ${MINIUPNP_LIBRARY}")
if (MINIUPNP_INCLUDE_DIR AND MINIUPNP_LIBRARY)
set (MINIUPNP_FOUND TRUE)
endif ()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MINIUPNP REQUIRED_VARS MINIUPNP_LIBRARY MINIUPNP_INCLUDE_DIR)
if (MINIUPNP_FOUND)
if (NOT MINIUPNP_FIND_QUIETLY)
message (STATUS "Found the miniupnpc libraries at ${MINIUPNP_LIBRARY}")
#message (STATUS "Found the miniupnpc libraries at ${MINIUPNP_LIBRARY}")
message (STATUS "Found the miniupnpc headers at ${MINIUPNP_INCLUDE_DIR}")
endif (NOT MINIUPNP_FIND_QUIETLY)