Skip to content

Commit 0b078cd

Browse files
authored
Merge pull request #533 from carsonalh/master
Fixed CMake install when compiled with extensions
2 parents 830f77f + 53e1449 commit 0b078cd

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ project(unity
4545
option(UNITY_EXTENSION_FIXTURE "Compiles Unity with the \"fixture\" extension." OFF)
4646
option(UNITY_EXTENSION_MEMORY "Compiles Unity with the \"memory\" extension." OFF)
4747

48-
# Fixture is a dependant of memory
49-
set(UNITY_EXTENSION_FIXTURE_ENABLED ${UNITY_EXTENSION_FIXTURE})
50-
set(UNITY_EXTENSION_MEMORY_ENABLED $<OR:$<BOOL:${UNITY_EXTENSION_MEMORY}>,$<BOOL:${UNITY_EXTENSION_FIXTURE}>>)
48+
set(UNITY_EXTENSION_FIXTURE_ENABLED $<BOOL:${UNITY_EXTENSION_FIXTURE}>)
49+
set(UNITY_EXTENSION_MEMORY_ENABLED $<OR:${UNITY_EXTENSION_FIXTURE_ENABLED},$<BOOL:${UNITY_EXTENSION_MEMORY}>>)
5150

5251
if(${UNITY_EXTENSION_FIXTURE})
5352
message(STATUS "Unity: Bulding with the fixture extension.")
@@ -84,10 +83,9 @@ target_include_directories(${PROJECT_NAME}
8483
set(${PROJECT_NAME}_PUBLIC_HEADERS
8584
src/unity.h
8685
src/unity_internals.h
87-
$<$<BOOL:${UNITY_EXTENSION_FIXTURE_ENABLED}>:extras/fixture/src/unity_fixture.h
88-
extras/fixture/src/unity_fixture_internals.h>
89-
$<$<BOOL:${UNITY_EXTENSION_MEMORY_ENABLED}>:extras/memory/src/unity_memory.h
90-
extras/memory/src/unity_memory_internals.h>
86+
$<$<BOOL:${UNITY_EXTENSION_FIXTURE_ENABLED}>:${CMAKE_CURRENT_SOURCE_DIR}/extras/fixture/src/unity_fixture.h>
87+
$<$<BOOL:${UNITY_EXTENSION_FIXTURE_ENABLED}>:${CMAKE_CURRENT_SOURCE_DIR}/extras/fixture/src/unity_fixture_internals.h>
88+
$<$<BOOL:${UNITY_EXTENSION_MEMORY_ENABLED}>:${CMAKE_CURRENT_SOURCE_DIR}/extras/memory/src/unity_memory.h>
9189
)
9290

9391
set_target_properties(${PROJECT_NAME}

0 commit comments

Comments
 (0)