From 4cbfe6919db6a3260f30f42308822b0e11403712 Mon Sep 17 00:00:00 2001 From: sam-astro <77079540+sam-astro@users.noreply.github.com> Date: Sat, 15 Jan 2022 21:33:19 -0500 Subject: [PATCH] Update CMakeLists.txt --- Slang/CMakeLists.txt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Slang/CMakeLists.txt b/Slang/CMakeLists.txt index 73eacf0..7d7cf4f 100644 --- a/Slang/CMakeLists.txt +++ b/Slang/CMakeLists.txt @@ -19,17 +19,6 @@ SET(programName Slang) # project. # either the variable values from package like ${PCL_INCLUDE_DIRS} or absolute paths as shown in second and third line may be used. #include_directories(${PCL_INCLUDE_DIRS}) -set(Boost_USE_STATIC_LIBS OFF) -set(Boost_USE_MULTITHREADED ON) -set(Boost_USE_STATIC_RUNTIME OFF) -FIND_PACKAGE(Boost REQUIRED COMPONENTS system) - -if(Boost_FOUND) - include_directories(${Boost_INCLUDE_DIRS}) - add_executable(progname file1.cxx file2.cxx) - target_link_libraries(progname ${Boost_LIBRARIES}) -endif() - include_directories("D:/Code/SDL2_ttf-2.0.15/include") include_directories("D:/Code/SDL2-2.0.18/include") include_directories("D:/Code/SDL2_image-2.0.5/include") @@ -55,9 +44,20 @@ link_directories("D:/Code/boost") # All cpp fles will be clubbed into source folder and all .h files will be added to header files folder of the project. add_executable (Slang Main.cpp main.h anyops.h builtin.h strops.cpp strops.h eval.cpp eval.h graphics.h SLB.h) -target_include_directories (Slang "D:/Code/boost/") +# target_include_directories (Slang "D:/Code/boost/") # There may be some additional dependencies which you may have to specify for the project, which you may do as in following lines. # Note that first parameter is the executable name. +set(Boost_USE_STATIC_LIBS OFF) +set(Boost_USE_MULTITHREADED ON) +set(Boost_USE_STATIC_RUNTIME OFF) +FIND_PACKAGE(Boost REQUIRED COMPONENTS system) + +if(Boost_FOUND) + include_directories(${Boost_INCLUDE_DIRS}) + #add_executable(progname file1.cxx file2.cxx) + target_link_libraries(Slang SDL2.lib SDL2main.lib SDL2_ttf.lib SDL2_image.lib ${Boost_LIBRARIES}) +endif() + target_link_libraries (Slang SDL2.lib SDL2main.lib SDL2_ttf.lib SDL2_image.lib) # # Add the required libraries for linking: # TARGET_LINK_LIBRARIES(${programName}