mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-23 00:01:15 +00:00
cmake: use interface for cleaner code
This commit is contained in:
parent
1e22f395af
commit
40da4def53
@ -179,10 +179,13 @@ add_library(lego1 SHARED
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (ISLE_USE_SMARTHEAP)
|
if (ISLE_USE_SMARTHEAP)
|
||||||
target_compile_options(lego1 PRIVATE "/FI${CMAKE_SOURCE_DIR}/3rdparty/smartheap/SMRTHEAP.HPP")
|
add_library(SmartHeap::SmartHeap STATIC IMPORTED)
|
||||||
target_include_directories(lego1 PRIVATE "${CMAKE_SOURCE_DIR}/3rdparty/smartheap")
|
set_target_properties(SmartHeap::SmartHeap PROPERTIES
|
||||||
target_link_directories(lego1 PRIVATE "${CMAKE_SOURCE_DIR}/3rdparty/smartheap")
|
IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/3rdparty/smartheap/SHLW32MT.LIB"
|
||||||
target_link_libraries(lego1 PRIVATE SHLW32MT)
|
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/3rdparty/smartheap"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "/FI${CMAKE_SOURCE_DIR}/3rdparty/smartheap/SMRTHEAP.HPP")
|
||||||
|
|
||||||
|
target_link_libraries(lego1 PRIVATE SmartHeap::SmartHeap)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Link libraries
|
# Link libraries
|
||||||
@ -203,10 +206,7 @@ if (ISLE_BUILD_APP)
|
|||||||
target_include_directories(isle PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1")
|
target_include_directories(isle PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1")
|
||||||
|
|
||||||
if (ISLE_USE_SMARTHEAP)
|
if (ISLE_USE_SMARTHEAP)
|
||||||
target_compile_options(isle PRIVATE "/FI${CMAKE_SOURCE_DIR}/3rdparty/smartheap/SMRTHEAP.HPP")
|
target_link_libraries(isle PRIVATE SmartHeap::SmartHeap)
|
||||||
target_include_directories(isle PRIVATE "${CMAKE_SOURCE_DIR}/3rdparty/smartheap")
|
|
||||||
target_link_directories(isle PRIVATE "${CMAKE_SOURCE_DIR}/3rdparty/smartheap")
|
|
||||||
target_link_libraries(isle PRIVATE SHLW32MT)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Link DSOUND, WINMM, and LEGO1
|
# Link DSOUND, WINMM, and LEGO1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user