diff --git a/CMakeLists.txt b/CMakeLists.txt index a9189a726..4d743d938 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,13 +51,14 @@ ENDIF ( ENABLE_BOOST_WORKAROUND ) ADD_SUBDIRECTORY( code/ ) - SET ( BUILD_ASSIMP_TOOLS ON CACHE BOOL "If the supplementary tools for Assimp are built in addition to the library." ) IF ( BUILD_ASSIMP_TOOLS ) IF ( WIN32 ) ADD_SUBDIRECTORY( tools/assimp_view/ ) + ADD_SUBDIRECTORY( samples/SimpleOpenGL/ ) + ADD_SUBDIRECTORY( samples/SimpleTexturedOpenGL/ ) ENDIF ( WIN32 ) ADD_SUBDIRECTORY( tools/assimp_cmd/ ) ENDIF ( BUILD_ASSIMP_TOOLS ) diff --git a/samples/SimpleOpenGL/CMakeLists.txt b/samples/SimpleOpenGL/CMakeLists.txt new file mode 100644 index 000000000..0e4554bfe --- /dev/null +++ b/samples/SimpleOpenGL/CMakeLists.txt @@ -0,0 +1,24 @@ +INCLUDE_DIRECTORIES( + ${Assimp_SOURCE_DIR}/include + ${Assimp_SOURCE_DIR}/code + ${Assimp_SOURCE_DIR}/samples/glut/ +) + +LINK_DIRECTORIES( + ${Assimp_BINARY_DIR} + ${Assimp_BINARY_DIR}/lib + ${Assimp_SOURCE_DIR}/samples/glut/ +) + +ADD_EXECUTABLE( assimp_simpleogl + Sample_SimpleOpenGL.c +) + +TARGET_LINK_LIBRARIES( assimp_simpleogl assimp ) +SET_TARGET_PROPERTIES( assimp_simpleogl PROPERTIES + OUTPUT_NAME assimp_simpleogl +) + +INSTALL( TARGETS assimp_simpleogl + DESTINATION "${BIN_INSTALL_DIR}" +) diff --git a/samples/SimpleTexturedOpenGL/CMakeLists.txt b/samples/SimpleTexturedOpenGL/CMakeLists.txt new file mode 100644 index 000000000..a67701739 --- /dev/null +++ b/samples/SimpleTexturedOpenGL/CMakeLists.txt @@ -0,0 +1,40 @@ +INCLUDE_DIRECTORIES( + ${Assimp_SOURCE_DIR}/include + ${Assimp_SOURCE_DIR}/code + ${Assimp_SOURCE_DIR}/samples/glut/ + ${Assimp_SOURCE_DIR}/samples/DevIL/include/ +) + +LINK_DIRECTORIES( + ${Assimp_BINARY_DIR} + ${Assimp_BINARY_DIR}/lib/ + ${Assimp_SOURCE_DIR}/samples/glut/ + ${Assimp_SOURCE_DIR}/samples/DevIL/lib/ +) + +ADD_EXECUTABLE( assimp_simpletexturedogl WIN32 + SimpleTexturedOpenGL/include/boost_includes.h + SimpleTexturedOpenGL/src/model_loading.cpp +) + +IF( WIN32 ) + SET( PSDK_PATH "C:/Program Files/Microsoft Platform SDK/Bin" ) + SET( PSDK_INC "C:/Program Files/Microsoft Platform SDK/Include" ) + + FIND_LIBRARY( WIN32_COMCTRL comctl32.lib + PATHS + "C:/Programme/Microsoft Platform SDK for Windows Server 2003 R2/Lib" + DOC "Path to psdk" + ) +ENDIF( WIN32 ) + + +TARGET_LINK_LIBRARIES( assimp_simpletexturedogl assimp opengl32.lib glu32.lib comctl32.lib devil.lib ) + +SET_TARGET_PROPERTIES( assimp_simpletexturedogl PROPERTIES + OUTPUT_NAME assimp_simpletexturedogl +) + +INSTALL( TARGETS assimp_simpletexturedogl + DESTINATION "${BIN_INSTALL_DIR}" +) diff --git a/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp b/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp index 94b40cdfe..56f1e64cd 100644 --- a/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp +++ b/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp @@ -798,7 +798,6 @@ LRESULT CALLBACK WndProc(HWND hWnd, // Handles for this Window } - int WINAPI WinMain( __in HINSTANCE hInstance, // Instance __in_opt HINSTANCE hPrevInstance, // Previous Instance __in_opt LPSTR lpCmdLine, // Command Line Parameters @@ -895,8 +894,3 @@ int WINAPI WinMain( __in HINSTANCE hInstance, // Instance KillGLWindow(); return (msg.wParam); // Exit The Program } - - - - - diff --git a/tools/assimp_view/assimp_view.cpp b/tools/assimp_view/assimp_view.cpp index d776fa407..3b76aad04 100644 --- a/tools/assimp_view/assimp_view.cpp +++ b/tools/assimp_view/assimp_view.cpp @@ -1182,10 +1182,4 @@ aiVector3D GetCameraMatrix (aiMatrix4x4& p_mOut) return g_sCamera.vPos; } -}; - - - - - - +}