@@ -6,25 +6,43 @@ set(CMAKE_CXX_VISIBILITY_PRESET hidden)
6
6
7
7
project (Lavender VERSION 1.0.0)
8
8
9
- add_library (${PROJECT_NAME} SHARED
10
- src/main.cpp
11
- # Add any extra C++ source files here
12
- )
9
+ if (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR} )
13
10
14
- target_compile_options (${PROJECT_NAME} PRIVATE
15
- -Wno-reorder-init-list
16
- )
11
+ add_library (${PROJECT_NAME} SHARED
12
+ src/main.cpp
13
+ # Add any extra C++ source files here
14
+ )
17
15
18
- target_include_directories (${PROJECT_NAME} PUBLIC
19
- include
20
- )
16
+ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" )
17
+ target_compile_options (${PROJECT_NAME} PRIVATE
18
+ -Wno-reorder-init-list
19
+ )
20
+ endif ()
21
21
22
- if (NOT DEFINED ENV{GEODE_SDK})
23
- message (FATAL_ERROR "Unable to find Geode SDK! Please define GEODE_SDK environment variable to point to Geode" )
24
- else ()
25
- message (STATUS "Found Geode: $ENV{GEODE_SDK} " )
26
- endif ()
22
+ target_include_directories (${PROJECT_NAME} PRIVATE
23
+ include
24
+ include /lavender
25
+ )
26
+
27
+ if (NOT DEFINED ENV{GEODE_SDK})
28
+ message (FATAL_ERROR "Unable to find Geode SDK! Please define GEODE_SDK environment variable to point to Geode" )
29
+ else ()
30
+ message (STATUS "Found Geode: $ENV{GEODE_SDK} " )
31
+ endif ()
27
32
28
- add_subdirectory ($ENV{GEODE_SDK} ${CMAKE_CURRENT_BINARY_DIR} /geode)
33
+ add_subdirectory ($ENV{GEODE_SDK} ${CMAKE_CURRENT_BINARY_DIR} /geode)
34
+
35
+ setup_geode_mod(${PROJECT_NAME} )
36
+ else ()
37
+ message (STATUS "Configuring Lavender as a subproject" )
38
+ add_library (${PROJECT_NAME} INTERFACE )
39
+ target_include_directories (${PROJECT_NAME} INTERFACE
40
+ include
41
+ )
29
42
30
- setup_geode_mod(${PROJECT_NAME} )
43
+ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" )
44
+ target_compile_options (${PROJECT_NAME} INTERFACE
45
+ -Wno-reorder-init-list
46
+ )
47
+ endif ()
48
+ endif ()
0 commit comments