Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CMakeLists.txt #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 2.9)
project(SOIL)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

include_directories(inc)

ADD_LIBRARY( soil STATIC
src/image_helper.c
src/stb_image_aug.c
src/image_DXT.c
src/SOIL.c
)
FILE(GLOB SOIL_c src/*.c)
FILE(GLOB SOIL_h inc/SOIL/*.h)

ADD_LIBRARY( soil STATIC ${SOIL_c} )

install( TARGETS soil ARCHIVE DESTINATION "lib" )
install( FILES ${SOIL_h} DESTINATION "include/SOIL" )
5 changes: 3 additions & 2 deletions src/SOIL.c
Original file line number Diff line number Diff line change
Expand Up @@ -1876,8 +1876,9 @@ int query_NPOT_capability( void )
if( has_NPOT_capability == SOIL_CAPABILITY_UNKNOWN )
{
/* we haven't yet checked for the capability, do so */
if(
(NULL == strstr( (char const*)glGetString( GL_EXTENSIONS ),
const char* glGetString_extentions_ptr = (char const*)glGetString(GL_EXTENSIONS);
if(glGetString_extentions_ptr != NULL &&
(NULL == strstr(glGetString_extentions_ptr,
"GL_ARB_texture_non_power_of_two" ) )
)
{
Expand Down