forked from assimp/assimp
-
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.
- Apply mechanism to decide use for IrrXML external or internal
Several distributions usually decide for shared external libraries instead of an usual embedded, for security reasons, duplicatiion issues. This change enable the possibility to set SYSTEM_IRRXML=ON for detect and build against a system installed irrxml. By default, the internal copy is compiled. Changes on build: - Added a FindIrrXML cmake module. - Moved the source recipe for proper CMakeLists inside contrib directory - Includes aren't path based anymore, using the provided INCLUDE_DIR - Compiler option are grouped in a singled entry on main CMakeLists Note: Current internal assimp irrXML is older than upstream irrlicht 1.8.4. To enable usage of this version, code need to be patched.
- Loading branch information
1 parent
c264df5
commit 4a0171b
Showing
6 changed files
with
57 additions
and
23 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Find IrrXMl from irrlicht project | ||
# | ||
# Find LibIrrXML headers and library | ||
# | ||
# IRRXML_FOUND - IrrXML found | ||
# IRRXML_INCLUDE_DIR - Headers location | ||
# IRRXML_LIBRARY - IrrXML main library | ||
|
||
find_path(IRRXML_INCLUDE_DIR irrXML.h | ||
PATH_SUFFIXES include/irrlicht include/irrxml) | ||
find_library(IRRXML_LIBRARY IrrXML) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(IrrXML REQUIRED_VARS IRRXML_INCLUDE_DIR IRRXML_LIBRARY) | ||
|
||
|
||
mark_as_advanced(IRRXML_INCLUDE_DIR IRRXML_LIBRARY) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Compile internal irrXML only if system is not requested | ||
if( NOT SYSTEM_IRRXML ) | ||
add_subdirectory(irrXML) | ||
endif( NOT SYSTEM_IRRXML ) |
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,13 @@ | ||
set( IrrXML_SRCS | ||
CXMLReaderImpl.h | ||
heapsort.h | ||
irrArray.h | ||
irrString.h | ||
irrTypes.h | ||
irrXML.cpp | ||
irrXML.h | ||
) | ||
|
||
add_library(IrrXML STATIC ${IrrXML_SRCS}) | ||
set(IRRXML_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "IrrXML_Include" ) | ||
set(IRRXML_LIBRARY "IrrXML" CACHE INTERNAL "IrrXML" ) |