Browse Source

Starting our C++ Project: enable SDL libraries in the build

Godzil 1 year ago
parent
commit
4e99613cc5
1 changed files with 6 additions and 7 deletions
  1. 6 7
      source/CMakeLists.txt

+ 6 - 7
source/CMakeLists.txt

@@ -1,12 +1,11 @@
 cmake_minimum_required(VERSION 3.8)
 
-#find_package(SDL2 REQUIRED)
-#find_package(SDL2_mixer REQUIRED)
-#find_package(SDL2_ttf REQUIRED)
-#find_package(SDL2_image REQUIRED)
+find_package(SDL2 REQUIRED)
+find_package(SDL2_ttf REQUIRED)
+find_package(SDL2_image REQUIRED)
 
-#set(SDL2_LIBS ${SDL2_LIBRARIES} ${SDL2IMAGE_LIBRARY} ${SDL2_TTF_LIBRARY} ${SDL2_MIXER_LIBRARY})
-#set(SDL2_INCDIR ${SDL2_INCLUDE_DIR} ${SDL2_IMAGE_INCLUDE_DIR} ${SDL2_TTF_INCLUDE_DIR} ${SDL2_MIXER_INCLUDE_DIR})
+set(SDL2_LIBS ${SDL2_LIBRARIES} ${SDL2IMAGE_LIBRARY} ${SDL2_TTF_LIBRARY})
+set(SDL2_INCDIR ${SDL2_INCLUDE_DIR} ${SDL2_IMAGE_INCLUDE_DIR} ${SDL2_TTF_INCLUDE_DIR})
 
 file(GLOB_RECURSE GE_SOURCES *.cpp)
 file(GLOB_RECURSE GE_HEADERS include/*.h)
@@ -14,5 +13,5 @@ file(GLOB_RECURSE GE_HEADERS include/*.h)
 add_executable(physicengine)
 target_include_directories(physicengine PUBLIC include/)
 target_sources(physicengine PRIVATE ${GE_SOURCES} ${GE_HEADERS})
-#target_include_directories(physicengine PUBLIC ${SDL2_INCDIR})
+target_include_directories(physicengine PUBLIC ${SDL2_INCDIR})
 target_link_libraries(physicengine ${SDL2_LIBS})