mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 01:09:50 +00:00
Fixed: STLport can't be used under Windows
This commit is contained in:
parent
8178f50365
commit
ee8055f5a3
2 changed files with 41 additions and 5 deletions
|
@ -86,11 +86,6 @@ NL_SETUP_PREFIX_PATHS()
|
|||
#-----------------------------------------------------------------------------
|
||||
#Platform specifics
|
||||
|
||||
IF(WITH_STLPORT)
|
||||
FIND_PACKAGE(STLport REQUIRED)
|
||||
INCLUDE_DIRECTORIES(${STLPORT_INCLUDE_DIR})
|
||||
ENDIF(WITH_STLPORT)
|
||||
|
||||
FIND_PACKAGE(Threads REQUIRED)
|
||||
FIND_PACKAGE(LibXml2 REQUIRED)
|
||||
FIND_PACKAGE(PNG REQUIRED)
|
||||
|
@ -109,6 +104,20 @@ ENDIF(WITH_STATIC)
|
|||
|
||||
NL_SETUP_BUILD()
|
||||
|
||||
IF(WITH_STLPORT)
|
||||
FIND_PACKAGE(STLport REQUIRED)
|
||||
INCLUDE_DIRECTORIES(${STLPORT_INCLUDE_DIR})
|
||||
IF(WIN32)
|
||||
FIND_PACKAGE(WindowsSDK REQUIRED)
|
||||
# convert IDE fullpath to include path
|
||||
STRING(REGEX REPLACE "Common7/IDE/[A-Za-z]+\\.exe" "VC/include" VCINCLUDE_DIR ${CMAKE_MAKE_PROGRAM})
|
||||
# use VC++ and Windows SDK include paths
|
||||
INCLUDE_DIRECTORIES(${VCINCLUDE_DIR} ${WINSDK_INCLUDE_DIR})
|
||||
# deactivate all global include paths
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /X")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(WITH_STLPORT)
|
||||
|
||||
IF(WITH_MFC)
|
||||
FIND_PACKAGE(MFC)
|
||||
ENDIF(WITH_MFC)
|
||||
|
|
27
code/CMakeModules/FindWindowsSDK.cmake
Normal file
27
code/CMakeModules/FindWindowsSDK.cmake
Normal file
|
@ -0,0 +1,27 @@
|
|||
# - Find Windows Platform SDK
|
||||
# Find the Windows includes
|
||||
#
|
||||
# WINSDK_INCLUDE_DIR - where to find Windows.h
|
||||
# WINSDK_FOUND - True if Windows SDK found.
|
||||
|
||||
IF(WINSDK_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
SET(WINSDK_FIND_QUIETLY TRUE)
|
||||
ENDIF(WINSDK_INCLUDE_DIR)
|
||||
|
||||
FIND_PATH(WINSDK_INCLUDE_DIR Windows.h
|
||||
PATHS
|
||||
"[HKEY_CURRENT_USER\\Software\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]/Include"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]/Include"
|
||||
)
|
||||
|
||||
IF(WINSDK_INCLUDE_DIR)
|
||||
SET(WINSDK_FOUND "YES")
|
||||
IF(NOT WINSDK_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Windows SDK.")
|
||||
ENDIF(NOT WINSDK_FIND_QUIETLY)
|
||||
ELSE(WINSDK_INCLUDE_DIR)
|
||||
IF(NOT WINSDK_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Warning: Unable to find Windows SDK!")
|
||||
ENDIF(NOT WINSDK_FIND_QUIETLY)
|
||||
ENDIF(WINSDK_INCLUDE_DIR)
|
Loading…
Reference in a new issue