Build Assimp from source

This commit is contained in:
Dane Johnson 2021-03-15 13:46:19 -05:00
parent bd1b28970e
commit f5cefe650d
4 changed files with 19 additions and 40 deletions

View File

@ -1,32 +0,0 @@
# - Try to find Assimp
# Once done, this will define
#
# ASSIMP_FOUND - system has Assimp
# ASSIMP_INCLUDE_DIR - the Assimp include directories
# ASSIMP_LIBRARIES - link these to use Assimp
FIND_PATH( ASSIMP_INCLUDE_DIR assimp/mesh.h
/usr/include
/usr/local/include
/opt/local/include
${CMAKE_SOURCE_DIR}/includes
)
FIND_LIBRARY( ASSIMP_LIBRARY assimp
/usr/lib64
/usr/lib
/usr/local/lib
/opt/local/lib
${CMAKE_SOURCE_DIR}/lib
)
IF(ASSIMP_INCLUDE_DIR AND ASSIMP_LIBRARY)
SET( ASSIMP_FOUND TRUE )
SET( ASSIMP_LIBRARIES ${ASSIMP_LIBRARY} )
ENDIF(ASSIMP_INCLUDE_DIR AND ASSIMP_LIBRARY)
IF(ASSIMP_FOUND)
IF(NOT ASSIMP_FIND_QUIETLY)
MESSAGE(STATUS "Found ASSIMP: ${ASSIMP_LIBRARY}")
ENDIF(NOT ASSIMP_FIND_QUIETLY)
ELSE(ASSIMP_FOUND)
IF(ASSIMP_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find libASSIMP")
ENDIF(ASSIMP_FIND_REQUIRED)
ENDIF(ASSIMP_FOUND)

View File

@ -8,9 +8,6 @@ find_package(glfw3 3.3 REQUIRED)
## Find Bullet
find_package(Bullet REQUIRED)
## Find AssImp
find_package(ASSIMP REQUIRED)
if (LUA_ENABLED)
## Find Lua
find_package(Lua REQUIRED)
@ -88,10 +85,6 @@ target_include_directories(couchlib
PUBLIC
${BULLET_INCLUDE_DIRS})
target_include_directories(couchlib
PUBLIC
${ASSIMP_INCLUDE_DIR})
target_link_libraries(couchlib glfw)
target_link_libraries(couchlib OpenGL::GL)
target_link_libraries(couchlib GLEW::GLEW)
@ -99,7 +92,6 @@ if (LUA_ENABLED)
target_link_libraries(couchlib_luascripting ${LUA_LIBRARIES})
endif ()
target_link_libraries(couchlib ${BULLET_LIBRARIES})
target_link_libraries(couchlib ${ASSIMP_LIBRARY})
## Add documentation
find_package(Doxygen REQUIRED

View File

@ -96,3 +96,15 @@ motivation comes from new features.
- [x] Compiles for windows
DLL Hell is still an issue, I have to distribute like 30 of them. Might go back to
simply including them in the package.
## Make platform available for retail
I think I might want to sell this software at some point.
- [ ] Add thirdparty libraries to source package
- [ ] Assimp
- [ ] Bullet
- [ ] Lua
- [ ] GLEW
- [ ] GLFW
- [ ] Double check for GPL compliance
- [ ] Host API somewhere
- [ ] Itch.io stuff

View File

@ -3,3 +3,10 @@ project(Couch)
## STB (image)
target_include_directories(couchlib
PUBLIC stb)
## ASSIMP
add_subdirectory(assimp)
target_include_directories(couchlib
PUBLIC
assimp/include)
target_link_libraries(couchlib assimp::assimp)