COSC-3P98-Final-Project/CMakeLists.txt

37 lines
1.4 KiB
CMake
Raw Normal View History

2023-01-16 12:48:42 -05:00
cmake_minimum_required(VERSION 3.24)
project(Final_Project)
set(CMAKE_CXX_STANDARD 17)
2023-01-16 13:51:51 -05:00
# My Stuff
2023-01-16 12:48:42 -05:00
file(GLOB_RECURSE CPP_FILES "src/*.cpp")
include_directories(include/)
2023-01-16 13:51:51 -05:00
add_subdirectory(libraries/BLT)
# External Libraries
find_package(GLUT)
if(NOT ${GLUT_FOUND})
message("WARNING -- If you are on linux please install the FreeGLUT lib")
set(GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include/glut/include")
set(GLUT_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/include/glut/lib/freeglut.lib")
endif()
message("Using GLUT ${GLUT_INCLUDE_DIRS} and ${GLUT_LIBRARIES}")
find_library(FreeImage_LIBRARIES libfreeimage.so OR libfreeimage.a)
find_file(FreeImage_INCLUDE FreeImage.h)
message(${FreeImage_LIBRARIES})
if(NOT ${FreeImage_LIBRARIES} OR NOT ${FreeImage_INCLUDE})
message("WARNING -- If you are on linux please install the FreeImage lib")
#set(FreeImage_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/libraries/freeimage/lib/FreeImage.lib;${CMAKE_CURRENT_SOURCE_DIR}/libraries/freeimage/lib/FreeImaged.dll")
endif()
message("Using FreeImage ${FreeImage_LIBRARIES} and ${FreeImage_INCLUDE}")
include_directories(${GLUT_INCLUDE_DIRS})
include_directories(${FreeImage_INCLUDE})
2023-01-16 12:48:42 -05:00
add_executable(Final_Project ${CPP_FILES})
2023-01-16 13:51:51 -05:00
target_link_libraries(Final_Project PRIVATE BLT)
target_link_libraries(Final_Project PRIVATE ${GLUT_LIBRARIES})
target_link_libraries(Final_Project PRIVATE ${FreeImage_LIBRARIES})