Skip to content

Commit

Permalink
Try trimming output dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
buddly27 committed Sep 28, 2024
1 parent 4283298 commit 2368360
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
17 changes: 6 additions & 11 deletions src/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ add_library(pyTf SHARED

set_target_properties(pyTf
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/src/python/$<CONFIG>/pxr/Tf"
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/src/python/$<CONFIG>/pxr/Tf"
ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/src/python/$<CONFIG>/pxr/Tf"
PREFIX ""
OUTPUT_NAME _tf
RUNTIME_OUTPUT_DIRECTORY "$<CONFIG>/pxr/Tf"
LIBRARY_OUTPUT_DIRECTORY "$<CONFIG>/pxr/Tf"
ARCHIVE_OUTPUT_DIRECTORY "$<CONFIG>/pxr/Tf"
POSITION_INDEPENDENT_CODE ON
)

target_include_directories(pyTf
Expand All @@ -57,14 +60,6 @@ target_link_libraries(pyTf
Boost::python
)

set_target_properties(pyTf
PROPERTIES
PREFIX ""
OUTPUT_NAME _tf
LIBRARY_OUTPUT_DIRECTORY pxr/Tf
POSITION_INDEPENDENT_CODE ON
)

if(WIN32)
set_target_properties(pyTf PROPERTIES SUFFIX ".pyd")
elseif(APPLE)
Expand Down
13 changes: 7 additions & 6 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -359,17 +359,17 @@ if (WIN32)
set_target_properties(testTfPyDllLinkImplementationGood
PROPERTIES
OUTPUT_NAME "testTfPyDllLinkImplementation"
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/test/$<CONFIG>/ImplementationGood"
ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/test/$<CONFIG>/ImplementationGood")
RUNTIME_OUTPUT_DIRECTORY "$<CONFIG>/ImplementationGood"
ARCHIVE_OUTPUT_DIRECTORY "$<CONFIG>/ImplementationGood")

add_library(testTfPyDllLinkImplementationBad SHARED
testTfPyDllLinkImplementationBad.cpp)

set_target_properties(testTfPyDllLinkImplementationBad
PROPERTIES
OUTPUT_NAME "testTfPyDllLinkImplementation"
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/test/$<CONFIG>/ImplementationBad"
ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/test/$<CONFIG>/ImplementationBad")
RUNTIME_OUTPUT_DIRECTORY "$<CONFIG>/ImplementationBad"
ARCHIVE_OUTPUT_DIRECTORY "$<CONFIG>/ImplementationBad")

# Create the _testTfPyDllLinkModule.pyd compiled python module

Expand All @@ -381,8 +381,9 @@ if (WIN32)
PREFIX ""
SUFFIX ".pyd"
OUTPUT_NAME "_testTfPyDllLinkModule"
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/test/$<CONFIG>/testenv/testTfPyDllLinkModule"
ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/test/$<CONFIG>/testenv/testTfPyDllLinkModule")
RUNTIME_OUTPUT_DIRECTORY "$<CONFIG>/testenv/testTfPyDllLinkModule"
LIBRARY_OUTPUT_DIRECTORY "$<CONFIG>/testenv/testTfPyDllLinkModule"
ARCHIVE_OUTPUT_DIRECTORY "$<CONFIG>/testenv/testTfPyDllLinkModule")

target_include_directories(testTfPyDllLinkModule
PUBLIC
Expand Down

0 comments on commit 2368360

Please sign in to comment.