Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] does it mean that it can't find my .lib file because I use a relative path?

[DiscordArchive] does it mean that it can't find my .lib file because I use a relative path?

[DiscordArchive] does it mean that it can't find my .lib file because I use a relative path?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
01-08-2023, 04:43 PM
#1
Archived author: William Von Kha • Posted: 2023-01-08T16:43:51.077000+00:00
Original source

does it mean that it can't find my .lib file because I use a relative path?
I have added in CmakeList.txt :
```
target_link_libraries(scripts
PRIVATE
trinity-core-interface
PUBLIC
TSClientSdk
game-interface)
```
the .lib should not be on my computer, but in the TrinityCore project?
rektbyfaith
01-08-2023, 04:43 PM #1

Archived author: William Von Kha • Posted: 2023-01-08T16:43:51.077000+00:00
Original source

does it mean that it can't find my .lib file because I use a relative path?
I have added in CmakeList.txt :
```
target_link_libraries(scripts
PRIVATE
trinity-core-interface
PUBLIC
TSClientSdk
game-interface)
```
the .lib should not be on my computer, but in the TrinityCore project?

rektbyfaith
Administrator
0
01-08-2023, 04:49 PM
#2
Archived author: Guybrush • Posted: 2023-01-08T16:49:56.659000+00:00
Original source

<@315115040170835970> two separate issues. the private/public issue pertains to inheritance
rektbyfaith
01-08-2023, 04:49 PM #2

Archived author: Guybrush • Posted: 2023-01-08T16:49:56.659000+00:00
Original source

<@315115040170835970> two separate issues. the private/public issue pertains to inheritance

rektbyfaith
Administrator
0
01-08-2023, 04:55 PM
#3
Archived author: Guybrush • Posted: 2023-01-08T16:55:58.892000+00:00
Original source

the path issue is that while it *may* work for you, you're assuming everyone has that path on their machine, and that that is the exact location for the TS lib. You're using an absolute path (providing the entire location) when you should be using a path *relative to the project*. Check out https://github.com/TrinityCore/TrinityCo...master/dep for examples
rektbyfaith
01-08-2023, 04:55 PM #3

Archived author: Guybrush • Posted: 2023-01-08T16:55:58.892000+00:00
Original source

the path issue is that while it *may* work for you, you're assuming everyone has that path on their machine, and that that is the exact location for the TS lib. You're using an absolute path (providing the entire location) when you should be using a path *relative to the project*. Check out https://github.com/TrinityCore/TrinityCo...master/dep for examples

rektbyfaith
Administrator
0
01-08-2023, 04:56 PM
#4
Archived author: Tea • Posted: 2023-01-08T16:56:21.592000+00:00
Original source

i dont think he cares about that right now, it doesnt even work for him
rektbyfaith
01-08-2023, 04:56 PM #4

Archived author: Tea • Posted: 2023-01-08T16:56:21.592000+00:00
Original source

i dont think he cares about that right now, it doesnt even work for him

rektbyfaith
Administrator
0
01-08-2023, 05:04 PM
#5
Archived author: William Von Kha • Posted: 2023-01-08T17:04:03.912000+00:00
Original source

for the inheritance I understood and I modified it as requested.
Now for the access path, I created as for boost an environment variable.
I never thought it would be so complicated to add two libraries...
And unfortunately I can't find any information to help me on the internet. I modified as follows:
```
find_package(TSClientSdk REQUIRED COMPONENTS lib)
find_package(TSServerSdk REQUIRED COMPONENTS lib)

add_library(TSClientSdk UNKNOWN IMPORTED)
add_library(TSServerSdk UNKNOWN IMPORTED)

target_link_libraries(TSClientSdk
INTERFACE
ts3client::ts3client)

target_link_libraries(TSServerSdk
INTERFACE
ts3server::ts3server)

set(TS_INCLUDE_DIR "$ENV{TS_INCLUDE_DIR}")
set(TS_LIB_DIR "$ENV{TS_LIB_DIR}")

set_target_properties(TSClientSdk
PROPERTIES
IMPORTED_LOCATION
"${TS_LIB_DIR}/ts3client.lib"
INTERFACE_INCLUDE_DIRECTORIES
"${TS_INCLUDE_DIR}")

set_target_properties(TSServerSdk
PROPERTIES
IMPORTED_LOCATION
"${TS_LIB_DIR}/ts3server.lib"
INTERFACE_INCLUDE_DIRECTORIES
"${TS_INCLUDE_DIR}")
```
With my environment variable in screen. More than that I don't know what to do...
[Image: image.png?ex=690c2c43&is=690adac3&hm=696...9530b2ddc&]
rektbyfaith
01-08-2023, 05:04 PM #5

Archived author: William Von Kha • Posted: 2023-01-08T17:04:03.912000+00:00
Original source

for the inheritance I understood and I modified it as requested.
Now for the access path, I created as for boost an environment variable.
I never thought it would be so complicated to add two libraries...
And unfortunately I can't find any information to help me on the internet. I modified as follows:
```
find_package(TSClientSdk REQUIRED COMPONENTS lib)
find_package(TSServerSdk REQUIRED COMPONENTS lib)

add_library(TSClientSdk UNKNOWN IMPORTED)
add_library(TSServerSdk UNKNOWN IMPORTED)

target_link_libraries(TSClientSdk
INTERFACE
ts3client::ts3client)

target_link_libraries(TSServerSdk
INTERFACE
ts3server::ts3server)

set(TS_INCLUDE_DIR "$ENV{TS_INCLUDE_DIR}")
set(TS_LIB_DIR "$ENV{TS_LIB_DIR}")

set_target_properties(TSClientSdk
PROPERTIES
IMPORTED_LOCATION
"${TS_LIB_DIR}/ts3client.lib"
INTERFACE_INCLUDE_DIRECTORIES
"${TS_INCLUDE_DIR}")

set_target_properties(TSServerSdk
PROPERTIES
IMPORTED_LOCATION
"${TS_LIB_DIR}/ts3server.lib"
INTERFACE_INCLUDE_DIRECTORIES
"${TS_INCLUDE_DIR}")
```
With my environment variable in screen. More than that I don't know what to do...
[Image: image.png?ex=690c2c43&is=690adac3&hm=696...9530b2ddc&]

rektbyfaith
Administrator
0
01-08-2023, 05:07 PM
#6
Archived author: William Von Kha • Posted: 2023-01-08T17:07:58.487000+00:00
Original source

and my cmake configuration
[Image: image.png?ex=690c2d2e&is=690adbae&hm=a4a...3a848b9a8&]
rektbyfaith
01-08-2023, 05:07 PM #6

Archived author: William Von Kha • Posted: 2023-01-08T17:07:58.487000+00:00
Original source

and my cmake configuration
[Image: image.png?ex=690c2d2e&is=690adbae&hm=a4a...3a848b9a8&]

rektbyfaith
Administrator
0
01-08-2023, 05:09 PM
#7
Archived author: Guybrush • Posted: 2023-01-08T17:09:10.819000+00:00
Original source

that's why there's an entire separate book on CMake
rektbyfaith
01-08-2023, 05:09 PM #7

Archived author: Guybrush • Posted: 2023-01-08T17:09:10.819000+00:00
Original source

that's why there's an entire separate book on CMake

rektbyfaith
Administrator
0
01-08-2023, 05:10 PM
#8
Archived author: Tea • Posted: 2023-01-08T17:10:45.919000+00:00
Original source

try like this
rektbyfaith
01-08-2023, 05:10 PM #8

Archived author: Tea • Posted: 2023-01-08T17:10:45.919000+00:00
Original source

try like this

rektbyfaith
Administrator
0
01-08-2023, 05:11 PM
#9
Archived author: Tea • Posted: 2023-01-08T17:11:25.612000+00:00
Original source

```
set_target_properties(TSServerSdk
PROPERTIES
IMPORTED_LOCATION
"${TSServerSdk_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES
"${TSServerSdk_INCLUDE_DIR}")
```
rektbyfaith
01-08-2023, 05:11 PM #9

Archived author: Tea • Posted: 2023-01-08T17:11:25.612000+00:00
Original source

```
set_target_properties(TSServerSdk
PROPERTIES
IMPORTED_LOCATION
"${TSServerSdk_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES
"${TSServerSdk_INCLUDE_DIR}")
```

rektbyfaith
Administrator
0
01-08-2023, 05:12 PM
#10
Archived author: Tea • Posted: 2023-01-08T17:12:16.535000+00:00
Original source

also drop ts3server::ts3server and ts3client::ts3client, they dont do anything for you
rektbyfaith
01-08-2023, 05:12 PM #10

Archived author: Tea • Posted: 2023-01-08T17:12:16.535000+00:00
Original source

also drop ts3server::ts3server and ts3client::ts3client, they dont do anything for you

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)