-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
30 lines (21 loc) · 1.02 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
cmake_minimum_required(VERSION 3.15)
project(PA03_template)
set(CMAKE_CXX_STANDARD 14)
# Create the executable for sorting
add_executable(PA03_sorting_mystery main.cpp)
message("Platform: " $ENV{PLATFORM})
if($ENV{PLATFORM} STREQUAL "wsl2")
message(" Identified wsl2 platform. Linking to mystery_sorting lib")
find_library(MYSTERY_LIBRARY mystery_sorting_wsl2 lib)
target_link_libraries(PA03_sorting_mystery LINK_PUBLIC ${MYSTERY_LIBRARY})
elseif($ENV{PLATFORM} STREQUAL "mac")
message(" Identified mac platform. Linking to mystery_sorting_mac lib")
find_library(MYSTERY_LIBRARY mystery_sorting_mac lib)
target_link_libraries(PA03_sorting_mystery LINK_PUBLIC ${MYSTERY_LIBRARY})
elseif($ENV{PLATFORM} STREQUAL "mac-intel")
message(" Identified Intel-mac platform. Linking to mystery_sorting_mac_intel lib")
find_library(MYSTERY_LIBRARY mystery_sorting_mac_intel lib)
target_link_libraries(PA03_sorting_mystery LINK_PUBLIC ${MYSTERY_LIBRARY})
else()
error("Platform Not Supported")
endif()