Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CMake file #300

Merged
merged 1 commit into from
Jan 16, 2022
Merged

Improve CMake file #300

merged 1 commit into from
Jan 16, 2022

Conversation

flobernd
Copy link
Member

@flobernd flobernd commented Jan 6, 2022

Change dependency path from "per project" to "per dependency"

ZYDIS_ZYCORE_PATH -> ZYAN_ZYCORE_PATH
...

This way we do not need to change multiple path variables when a dependency is used multiple times. E.g. in case of Zyrex:

  • Zyrex
    • Zycore (./dependencies/zycore [ZYREX_ZYCORE_PATH])
    • Zydis (./dependencies/zydis [ZYREX_ZYDIS_PATH])
      • Zycore (./dependencies/zydis/dependencies/zycore [ZYDIS_ZYCORE_PATH])

After my change there is only one Zycore path pointing to the top-level dependency:

  • Zyrex
    • Zycore (./dependencies/zycore [ZYAN_ZYCORE_PATH])
    • Zydis (./dependencies/zydis [ZYAN_ZYDIS_PATH])
      • Zycore (./dependencies/zycore [ZYAN_ZYCORE_PATH])

Only negative point: This prevents the user to intentionally choose different dependency versions for individual sub-dependencies. I don' think this is really needed tho and as well to fully support that (at least for Windows shared builds) we would have to add a version suffix to the generated .dll files.

@flobernd flobernd requested a review from athre0z January 6, 2022 00:01
Copy link
Member

@athre0z athre0z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ZYDIS -> ZYAN rename for re-usability looks good to me. Will break the Debian build though (CC @Tachi107).

CMakeLists.txt Outdated Show resolved Hide resolved
@Tachi107
Copy link
Contributor

Tachi107 commented Jan 7, 2022

The ZYDIS -> ZYAN rename for re-usability looks good to me. Will break the Debian build though (CC @Tachi107).

@athre0z don't worry, before updating I always check if I have to change the Debian build script, but thanks for keeping me updated :)

@flobernd flobernd merged commit 124571c into master Jan 16, 2022
@athre0z athre0z deleted the improve-cmake branch January 16, 2022 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants